

For this article I am going with the assumption that I am building out the data access layer for a project and task tracking application. Designing the DatabaseĪs with almost every one of my other articles I will be using a made up application to help describe some of the important aspects of database programming with Node.js and SQLite. I will now create an empty file right next to the package.json file called database.sqlite3 that SQLite will store data in. In addition to sqlite3 I am going to install Bluebird so that I can use the familiar promise functionality in my database programming. Next I will need to install sqlite3 package via npm like so: $ npm install -save sqlite3 "test": "echo \"Error: no test specified\" & exit 1"

"description": "Code for tutorial blog on node and sqlite", Save it as a dependency in the package.json file.ĭescription: Code for tutorial blog on node and sqliteĪbout to write to /node-sqlite/app/package.json: Use `npm install -save` afterwards to install a package and See `npm help json` for definitive documentation on these fields

It only covers the most common items, and tries to guess sane defaults. This utility will walk you through creating a package.json file. I will begin by creating a new npm package using npm init inside an empty directory called node-sqlite-tutorial. For those not familiar with SQLite, it is a simple single file relational database that is very popular among smart devices, embedded systems, and even small web application.
#Node red sqlite how to
In this tutorial I will be demonstrating how to use SQLite in combination with JavaScript inside the Node.js environment with the help of the sqlite3 Node.js driver.
