A boilerplate/starter project for quickly building CRUD API using Node.js, Express, Pug and Postgres.
.
├── ./api
├── ./config
├── ./controllers
├── ./middlewares
├── ./models
├── ./public
├── ./routes
├── ./scratch
├── ./validate
├── ./views
├── ./key.js
└── ./server.jsClone the repo:
git clone https://github.com/ductnn/nodejs-postgresql-boilerplate.git
cd nodejs-postgresql-boilerplateInstall the dependencies:
npm installNote: Install nodemon (optional) on golbal scope in your host machine (flag -g) using npm
Set the enviroment variables:
cp .env.example .env
# open .env and modify the environment variables (if needed)Start API server:
npm startor
npm run devNote: If you don't use nodemon start server by node server.js
Contributions are more than welcome in this project!
The MIT License (MIT). Please see LICENSE for more information.