- Create the
.env
by using.env.example
as a reference:cp .env.example .env
- Update the .env file with your correct local information
- username:
development
- password:
development
- database:
solar_flares
- Install dependencies:
npm i
- Reset database:
npm run seed
- Make sure mongo dB server is installed first!
- Run the server:
npm run local
- Note: nodemon is used, so you should not have to restart your server
NOTE:
- make sure you run
npm i
andnpm run seed
in the same environment where both node and mongo are installed
- Visit
http://localhost:8080/
- if you have a port conflict, it can be changed in
.env
file
-
use / modify place holders routes
adminRoutes.js
andclientRoutes.js
-
Use the
npm run seed
command each time there is a change to the database schema or seeds.- It runs through each of the files, in order, and executes them against the database.
- Note: you will lose all newly created (test) data each time this is run, since the schema files will tend to
DROP
the tables and recreate them.
- Node 12.x or above
- NPM 5.x or above
- mongo dB v4.x or above