nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.61k stars 29.59k forks source link

Is it possible to add IndexedDB to node #40045

Closed whiter001 closed 2 years ago

whiter001 commented 3 years ago

https://cs.chromium.org/chromium/src/content/browser/indexed_db/ maybe like https://github.com/mbdavid/litedb

mscdex commented 3 years ago

I think it's best to leave that to userland. My suggestion would be to find and use a module that works in all browsers and node. There's probably already something like that on npm.

Trott commented 3 years ago

@whiter001 What's the reason for wanting this in Node.js instead of using an npm module? lokijs seems pretty popular for this kind of thing.

whiter001 commented 3 years ago

@Trott I find deno doing this, It should be possible for node to do the same, A simple and easy-to-use database is really usefull, It's not a simple job. It seems that adding node will be easier. If there is no one in the community. We still have to do one. lokijs Yes! thanks for your reply. If there is a good implementation, of course, there is no need to do the second time, Unless there is a better implementation Sorry, now I can't say how much the implementation in node can improve than that in community, Maybe it can be written as bson, Operate more data and break through the memory limit. In the JS world, the document database is easier to use than sqllite. I think a lightweight document database like SQLite3 can be used in projects like vscode, 🤔 If you don't think it's necessary, I will close

jimmywarting commented 1 year ago

I would like to see IndexedDB working inside of NodeJS core too.