This is a development version of Task App (worked on this as guided by the nodejs course instructor Andrew Mead) which enables the user to create profile and keep a track of the tasks to be performed/already performed
1. Install Nodejs, MongoDB, Postman(to create and save HTTP/s requests and read their responses), Robo3t(GUI for mongoDB) on your machine
git clone https://github.com/mitalirs/Task-App.git
npm i
4. Create a folder with the name 'config' in the project directory and a dev.env file(inside the config folder) to store environment variables(key=value format).
5. Create a task app collection in Postman and create and save get, post, patch and delete requests inside it
5.2 Edit the collection to select the 'bearer token' type inside the authorization tab and insert the value {{authtoken}} (the syntax for env variable) for the token key
5.3 To automatically set the value of authtoken for every request after signing up/logging in, inside the Tests tab of signup and login requests write following codes respectively:
if(pm.response.code === 201){pm.environment.set('authtoken', pm.response.json().token)}
if(pm.response.code === 200){pm.environment.set('authtoken', pm.response.json().token)}
5.4 For signup/login requests select the type as 'no auth' under the authorization tab and for rest of the requests select the type 'Inherit auth from parent'
npm run dev