This Project will help you to get started quickly with your Backend project using ExpressJs, ORM-Sequelize, and Postgres
- Express - web framework
- Nodejs- Runtime Environment for Javascript.
- Mocha, Chai, and supertest - Test framework and other dependencies
- nyc and istanbul - for coverage test.
- morgan - logging library
- Sequelize - Postgres ORM
- Postgres - Postgres Database
1. Download the project from the repository
2. Unzip the project
2. Copy and paste all the files and folders in the project to your new project directory
3. run `npm install`
After you install your project dependencies and dev dependency. You will need to:
-
Create environment variable for(database name, password and username). see instructions on how to create enviroment variable for your project
-
Create database for test and development environment
To create database in:
- Production enviroment run
npm run createdb
. - Development environment run
npm run create:dev:db
. - Test environment run
npm run create:test:db
.
To run your project in a test enviroment:
Run npm test or npm run local:test
Once you are done with your database configuration you can start your project in development mode. To start your project in this mode, all you need to do is run npm start
How to test your endpoint in development mode
Use Postman to test out your endpoints. You can download Postman with this Link and install it.