A VS Code snippet extension that generates ready-to-use boilerplate code for Express + SQLite3 + CORS server development. Stop memorizing boilerplate and start shipping faster.
Installation
Option 1: Install from VSIX (Recommended)
Open VS Code.
Go to the Extensions sidebar (Ctrl+Shift+X).
Click the ... (More Actions) menu at the top right → Install from VSIX...
Select node-sqlite-snippets-1.0.0.vsix from this folder.
Reload VS Code if prompted.
Option 2: Manual Copy
Press Ctrl+Shift+P → type "Open Extensions Folder" and select it.
Copy this entire VSCODE-EXT folder into that directory.
Reload VS Code (Ctrl+Shift+P → "Developer: Reload Window").
Snippets
All snippets work in JavaScript (.js) files. Type the prefix and press Tab or Enter to expand.
Prefix
Description
njs-server
Full Express + SQLite3 server — database connection, table creation, and complete CRUD API
njs-express
Minimal Express server skeleton
njs-db
SQLite3 connection boilerplate with table creation
njs-get
Express GET route with db.all() query
njs-post
Express POST route with db.run() insert
njs-put
Express PUT route with db.run() update
njs-del
Express DELETE route with db.run() delete
njs-cors
CORS middleware configuration block
njs-pkg
package.json dependencies block for Express, SQLite3, and CORS
Quick Start
Create a new file: server.js
Type: njs-server
Press Tab
Edit the placeholders (database name, table name, columns) by pressing Tab to navigate.
Install dependencies:
npm init -y
npm install express sqlite3 cors
Run the server:
node server.js
Your fully working REST API with an SQLite database is now running on http://localhost:3000.
Example: njs-server Output
This snippet generates a complete working server including:
express, sqlite3, and cors imports
Database connection with error handling
Auto-created table if it doesn't exist
Full CRUD endpoints:
GET / — health check
GET /users — list all users
GET /users/:id — get one user
POST /users — create user
PUT /users/:id — update user
DELETE /users/:id — delete user
Graceful shutdown handling (SIGINT)
Tab Stops (Placeholders)
Snippets use ${1:default} placeholders so you can customize values quickly:
${1:data.db} → change database filename
${2:users} → change table name
${3:name} → change column name
Press Tab to jump to the next placeholder. Press Shift+Tab to go back.