Skip to content

A very simple rest api boilerplate to help you to create a new project

Notifications You must be signed in to change notification settings

douglas-henrique/express-sequelize-jwt-boilerplate-api

Repository files navigation

express-sequelize-jwt-boilerplate-api

A simple REST API boilerplate builded with NodeJS, ExpressJS, Sequelize and JWT

Features

  • User register
  • User auth
  • Protected routes with JWT

Running the project

Install packages running

    yarn

Copy the env example to .env

    cp .env.example .env

You need MySQL database to run this project. You can use the following command to start a docker with mysql and user setted:

    docker run --name mysql -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d mysql

Edit the .env file with the database informations ans generate a hash string to use on JWT_HASH.

After database created and running, run the sequelize migration

    npx sequelize-cli db:migrate

Then you can start the project running

    yarn dev

You should a message like: Server running on port 3333

Done. Enjoy it!

About

A very simple rest api boilerplate to help you to create a new project

Topics

Resources

Stars

Watchers

Forks