2.1 KiB
2.1 KiB
WebService Boilerplate
A boilerplate for a web service using NodeJS and Express.
Installation
Install dependencies with yarn
yarn
Usage
Build the project with yarn build
yarn build
Start the server with yarn start
yarn start
Development
Run yarn dev to start a development server.
yarn dev
Sequelize CLI
You can use the Sequelize CLI to manage your database.
Environment Variables
The following environment variables are required:
| Variable | Description |
|---|---|
DB_USERNAME |
The username for the database |
DB_PASSWORD |
The password for the database |
DB_NAME |
The name of the database |
DB_HOSTNAME |
The hostname of the database |
DB_PORT |
The port of the database |
DB_DIALECT |
The dialect of the database |
DB_LOGGING |
Whether to log the queries to the console (true or false) |
DEV_DB_USERNAME |
The username for the development database |
DEV_DB_PASSWORD |
The password for the development database |
DEV_DB_NAME |
The name of the development database |
DEV_DB_HOST |
The hostname of the development database |
DEV_DB_PORT |
The port of the development database |
DEV_DB_DIALECT |
The dialect of the development database |
DEV_DB_LOGGING |
Whether to log the queries to the console (true or false) |
JWT_SECRET |
The secret for the JWT token |
VITE_API_URL |
The URL of the API |
Useful information
You can use /api/v1/auth/generatePasswordHash?password=123456 to generate a password hash for development purposes