What SQLite to use with nodejs What SQLite to use with nodejs sqlite sqlite

What SQLite to use with nodejs


Use https://github.com/mapbox/node-sqlite3. It's asynchronous (almost a must-have), it's the most actively maintained, and it has the most stars on GitHub.


Alternatively, you could use a javascript embedded database. This way you just need to declare the database as a dependency in your package.json and require() it in your application.

Check out NeDB (which I wrote) or nStore for example.


For my architecture synchronous better-sqlite3 appeared to be better:

https://www.npmjs.com/package/better-sqlite3

  • Full transaction support
  • Geared for performance, efficiency, and safety
  • Easy-to-use synchronous API (faster than an asynchronous API)
  • Custom SQL function support
  • 64-bit integer support (invisible until you need it)