This is just a basic nodejs
assignment for the backend
section in HNGI9
.
- Nodejs
- Expressjs
clone the repo
git clone https://github.com/Benrobo/HNGI9-Backend-Assessment.git
Install all dependencies.
Note:- before doing that, make sure you have
nodejs
andnpm
installed locally.
npm install
Start the local server
npm start
You should get the following result in the terminal
server started at http://localhost:5000
visit http://localhost:5000/user
to see the below response.
{
"slackUsername":"benrobo",
"backend": true,
"age":20,
"bio":"....."
}
Making some calculations.
visit http://localhost:5000/compute
and pass in a payload in the below format.
{
"operation_type": "multiplication",
"x": "5",
"y": "5"
}
Result should be
{
"slackUsername": "Benrobo",
"operation_type": "multiplication",
"result": 25
}
open the link in browser and you should be greeted with a text called Hello World