Skip to content

winverse/express-rest-api-sample

Repository files navigation

Express-rest-api-sample

NodeJS REST API sample with integration Express, Sequelize

Configure Environment Variables

Open .env.sample file and edit the values and then
change file name .env.development or .env.production depending on your environment if you need to.

This project uses dotenv to read and use .env file

Project Start

This project requires Node 14 or later.

 1. yarn // install dependencies
 2. yarn dev // run server

Migration Skeleton

Create migration file using sequelize cli

  npx sequelize-cli migration:generate --name <name>

Running migrations

  yarn db:migrate

Sync database

  yarn db:sync

Test

To run test, install jest

  yarn test