Task1 - Individual task for week 1 Task 1 – NodeJS-Express
Modules used
- express
- body-parser
- https
- node-fetch
- http
- fs
- url
Follow the steps for executing the Individual tasks
node server.js
on browser
- Hello world – localhost:8080
- Route to fetch list of authors – localhost:8080/authors– check console. Press F5 for displaying on browser to fetch list of posts – localhost:8080/posts – check console. Press F5 for displaying on browser repond with list of authors and count of posts – localhost:8080/postcnt – check console. Press F5 for displaying on browser
- Set a cookie – localhost:8080/setcookie – press F12 and check Application->cookies->localhost:8080
- Fetch set cookie – localhost:8080/getcookie – check console. Press F5 for displaying on browser
- Deny request - localhost:8080/robot.html
- Render image – localhost:8080/image
- Get input and post – localhost:808/input