Skip to content

nitor-infotech-oss/node-fastify-starter

Repository files navigation

NodeJS Boilerplate

This is a boilerplate application for building REST APIs in Node.js using ES6 and Fastify. Intended for use with Postgres using Sequelize ORM.

Installation

This application uses yarn, so let's install yarn first.

npm install -g yarn

Install dependencies:

yarn

Usage

Set environment (vars):

cp .env-sample .env

Start server:

yarn start

Run tests:

# Run tests written in ES6
yarn test

Set up database:

Run migrations

sequelize db:migrate

Run seeds

sequelize db:seed:all

Create new migration file

sequelize model:generate --name User --attributes name:string,email:string

Generate new seed file

sequelize seed:generate --name add-new-user

** Database details can be updated in the .env file

License

ISC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published