Finally, we're ready to run the Notes application with SQLite3. Add the following code to the scripts section of package.json:
"start-sqlite3": "SQLITE_FILE=chap07.sqlite3 NOTES_MODEL=sqlite3 node --experimental-modules ./bin/www.mjs",
Run the Notes application:
$ DEBUG=notes:* npm run start-sqlite3 > notes@0.0.0 start-sqlite3 /Users/david/chap07/notes > SQLITE_FILE=chap07.sqlite3 NOTES_MODEL=models/notes-sqlite3 node ./bin/www.mjs notes:server Listening on port 3000 +0ms notes:sqlite3-model Opened SQLite3 database chap07.sqlite3 +5s
You can now browse the application at http://localhost:3000, and run it through its paces as before.
Because SQLite3 supports simultaneous access from multiple instances, you can ...