REST API for an Elearning website
- navigate to the project folder
cd elearning
- install npm dependencies
npm i
- seed the database
npm run seed
- start the project
npm start
You can find the api documentation at Postman
- config.env file in project's root directory is used to store the configuration "env. variables"
- In config.env, you can change NODE_ENV from development to production and vice versa
- development: error details and stack is returned, also logs are logged to the console
- production: production error version is returned, logs are logged to logs files
- The api default url is localhost:8000/api/v1
- Can be changed from config.env
- This is a simple project aims to learn and practice, In real production application .env and .pem files shouldn't be added to the repo.
- the command
node utils/generatePublicAndPrivateKeys.js
is used to generate '.pem' files in the jwt-keys folder under '/config'