-
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
nodemonglobally, if you don't have it yet.npm install -g nodemon
-
Congfigure environment settings
Create a file with the following name and location
.envand copy the contents from.env.exampleinto it. Replace the values with your specific configuration. Don't worry, this file is in the.gitignoreso 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.jsonfile.npm run dev
indraarianggi/nodejs-sequelize-mysql-api
REST API using Node.js, Express, Sequelize and MySQL + JWT Authentication and Authorization
JavaScript