-
Clone this repository
git clone https://github.com/indraarianggi/nodejs-sequelize-mysql-api.git cd nodejs-sequelize-mysql-api
-
Install the npm packages
npm install
Also install
nodemon
globally, if you don't have it yet.npm install -g nodemon
-
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
-
Running the app locally
Run this command, which is located in npm script in
package.json
file.npm run dev
indraarianggi/nodejs-sequelize-mysql-api
REST API using Node.js, Express, Sequelize and MySQL + JWT Authentication and Authorization
JavaScript