Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ductnn/nodejs-postgresql-boilerplate
A simple boilerplate for building CRUD using Node.js, Express, Pug and Postgresql.
https://github.com/ductnn/nodejs-postgresql-boilerplate
expressjs nodejs postgresql
Last synced: 1 day ago
JSON representation
A simple boilerplate for building CRUD using Node.js, Express, Pug and Postgresql.
- Host: GitHub
- URL: https://github.com/ductnn/nodejs-postgresql-boilerplate
- Owner: ductnn
- License: mit
- Created: 2020-04-01T14:01:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T15:21:53.000Z (about 2 years ago)
- Last Synced: 2024-04-22T21:13:08.915Z (10 months ago)
- Topics: expressjs, nodejs, postgresql
- Language: JavaScript
- Homepage:
- Size: 565 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CRUD API Node Server Boilerplate
[![CI](https://github.com/ductnn/nodejs-postgresql-boilerplate/actions/workflows/ci.yml/badge.svg)](https://github.com/ductnn/nodejs-postgresql-boilerplate/actions/workflows/ci.yml) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/ductnn/nodejs-postgresql-boilerplate/pulls) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)A boilerplate/starter project for quickly building CRUD API using Node.js,
Express, Pug and Postgres.## Project structure
```bash
.
├── ./api
├── ./config
├── ./controllers
├── ./middlewares
├── ./models
├── ./public
├── ./routes
├── ./scratch
├── ./validate
├── ./views
├── ./key.js
└── ./server.js
```## Install
Clone the repo:
```bash
git clone https://github.com/ductnn/nodejs-postgresql-boilerplate.git
cd nodejs-postgresql-boilerplate
```Install the dependencies:
```bash
npm install
```**Note:** Install nodemon (optional) on golbal scope in your host machine (flag
-g) using npmSet the enviroment variables:
```bash
cp .env.example .env# open .env and modify the environment variables (if needed)
```## Commands
Start API server:
```bash
npm start
```or
```bash
npm run dev
```**Note:** If you don't use `nodemon` start server by `node server.js`
## Contribution
Contributions are more than welcome in this project!## License
The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.