Hilarion18 / simple-nodejs-postgresql

Boilerplate to build a starting API with Node.js, Express and PostgreSQL on ES6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-nodejs-postgresql

[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)

This is a boilerplate to build a starting API with Node.js, Express and PostgreSQL on ES6. It is also configured with babel.

Introduction

This is a starting application for create an API with a Node.js and Express, using PostgreSQL for database and Sequelize as ORM.

Development mode

The server side Express code will be served by a node server using Nodemon which helps in automatically restarting the server whenever server side code changes.

Quick Start

# Clone the repository
git clone git@github.com:ParmentierChristophe/simple-nodejs-postgresql.git

or

git clone https://github.com/ParmentierChristophe/simple-nodejs-postgresql.git

# Go inside the directory
cd simple-nodejs-postgresql

# Install dependencies
yarn (or npm install)

# Start development server
yarn dev (or npm run dev)

Documentation

Folder Structure

the entrance of the application is index.js, on folder database All files created by Sequelize (migrations, seeds, models, config) and on folder server all files for API and for server (config, modules, controllers, middlewares).

Folder Database

In the database folder you already have two models and the migration files for creating two Posts and Users tables with a relationship. to create these tables, make with Sequelize:

sequelize db:migrate

You also seeds, make with Sequilize :

sequelize db:seed:all

Babel

Nodemon

Express

PostgreSQL

Sequelize

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Antoine Caron
Antoine Caron

💻 🤔 👀

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Boilerplate to build a starting API with Node.js, Express and PostgreSQL on ES6


Languages

Language:JavaScript 99.7%Language:Shell 0.3%