API to serve Knowledge - Front End
- Node.js
- Express
- Jwt
- Passport
- PostgreSQL
- Knex
- MongoDB
- Mongoose
Download and install PostgreSQL version 9.6
sudo apt update
sudo apt install postgresql postgresql-contrib -y
- Create a cluster at Mongo Atlas
- Connect it to the application by rewritting the URL at './config/mongoDB.js' file with your cluster URL
Set you local settings in sample_env file and rename it to .env
Make sure to set the correct settings.
npm install
npm start
npm run production
By default, new users are signup without admin privilages.
To create a new User with admin privileges:
- Comment lines 17 and 18 from 'api/users.js'
- Make a POST request to 'http://localhost:3000/signup' passing JSON with "admin":"true" in the body of request.
- Uncomment lines 17 and 18.
- Now you can use Knowledge - Front End as admin