Skip to content

REST API using Node.js, Express, Sequelize and MySQL + JWT Authentication and Authorization

Notifications You must be signed in to change notification settings

tanbinh123/nodejs-sequelize-mysql-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API using Node.js, Express, Sequelize and MySQL + JWT Authentication and Authorization

Getting Started

  1. Clone this repository

    git clone https://github.com/indraarianggi/nodejs-sequelize-mysql-api.git
    cd nodejs-sequelize-mysql-api
  2. Install the npm packages

    npm install

    Also install nodemon globally, if you don't have it yet.

    npm install -g nodemon
  3. Congfigure environment settings

    Create a file with the following name and location .env and copy the contents from .env.example into it. Replace the values with your specific configuration. Don't worry, this file is in the .gitignore so it won't get pushed to github.

     NODE_ENV=development
     PORT=8080
    
     # Database
     DB_HOST=your-db-host
     DB_USER=your-db-username
     DB_PASS=your-db-password
     DB_NAME=your-db-name
    
  4. Running the app locally

    Run this command, which is located in npm script in package.json file.

    npm run dev

Resources

  1. Node.js Rest APIs example with Express, Sequelize & MySQL

  2. Node.js – JWT Authentication & Authorization with JSONWebToken example

  3. In-depth Introduction to JWT-JSON Web Token

  4. Sequelize Documentation

  5. Getting Started with Node, Express and Mysql Using Sequelize

  6. Hidup Mudah dengan Sequelize: ORM Untuk Aplikasi NodeJS

  7. Node.js Everywhere with Environment Variables!

About

REST API using Node.js, Express, Sequelize and MySQL + JWT Authentication and Authorization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%