An open API service indexing awesome lists of open source software.

https://github.com/nutancoder/nodejs-sqlite-api-jwt

A ready to use REST API using nodejs and sqlite with swagger for learning frontend
https://github.com/nutancoder/nodejs-sqlite-api-jwt

jwt-authentication rest-api sqlite swagger

Last synced: about 1 month ago
JSON representation

A ready to use REST API using nodejs and sqlite with swagger for learning frontend

Awesome Lists containing this project

README

          

# Node.js SQLite In-Memory Database Example

This project sets up an **in-memory SQLite database** using Node.js and the `sqlite3` package. It defines two tables:

- `users`: Stores user data with unique emails.
- `books`: Stores books with a foreign key referencing a user.

## Features

- Uses SQLite in-memory mode (data resets on every restart).
- Initializes `users` and `books` tables on server start.
- Demonstrates usage of foreign keys in SQLite.

## Prerequisites

- Node.js (v14 or above recommended)
- npm

## Installation

```bash
git clone https://github.com/NutanCoder/nodejs-sqlite-api-jwt.git
cd nodejs-sqlite-api-jwt
npm install
npm run start
```