NodeJS boilerplate project
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Make sure you have Node.js and Docker (preferably) installed. This will make it easy to run the project locally and all tests without having to install PostgreSQL and Redis onto your system.
Install all dependencies
npm install
This repository contains a docker-compose.yml
file providing PostgreSQL and Redis.
Start PostgreSQL in daemon mode:
docker-compose up -d postgres
The project uses a sql query builder called knex.js which provides migration support.
Run all migrations via npm run db:migrate
.
DATABASE_URL
from the environment variables.The project uses a sql query builder called knex.js which provides seeding support.
Run all initial seeds via npm run db:seed
.
DATABASE_URL
from the environment variables.INITIAL_SEED_USERNAME
and INITIAL_SEED_PASSWORD
from the environment variables to create an initial Admin user.Start redis in daemon mode:
docker-compose up -d redis
.env
file. There is an .env.example
file provided with all required and optional variables.// Start
npm run start
// Build and start
npm run serve
test.config.ts
file under the tests
folder. This will take the provided docker container strings by default.npm run test
npm run test:coverage
When you find issues, please report them:
Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.
See the list of contributors who participated in this project.
This project is licensed under the ISC License - see the LICENSE.md file for details