Skip to content

joscelyn56/node-sequelize-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Sequelize API

This is the api for the Rivers State app.

Technologies

  1. Nodejs
  2. MySQL
  3. Express
  4. Sequelize

Setup

Install all dependencies
npm install

Create a new .env file

Set your node env variable (development, testing or production) in the .env
NODE_ENV=development

Set your database config for your development environment in the config.js file
The Path to config file = ./src/config/db/config.js

Update the db config in the development object to connect to your local db
"username": "Database User"
"password": "Database Password if any"
"database": "Database Name"
"host": "Database Local Host

Setup MySQL database by configuring the .env file
DB=Database Name
DB_USER=Database User
DB_PASSWORD=Database Password if Any
DB_PORT=3306
DB_HOST=127.0.0.1
PORT=Set Port for API to run on

Run migrations using sequelize
npx sequelize-cli db:migrate

Run seeder to add default admin
npx sequelize-cli db:seed:all

Testing

To run test
npm run test

About

A simple backend api using node.js, express, sequelize and mysql

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors