In one of the terminal run the command
node server.js
curl --header 'content-type: application/json' localhost:3000/hello
curl --header localhost:3000/hello
curl --header 'content-type: application/json' localhost:3000/hello --data '{"foo":"bar"}'
In one of the terminal run the command
node server.js
curl --header 'content-type: application/json' localhost:3000/hello
curl --header localhost:3000/hello
curl --header 'content-type: application/json' localhost:3000/hello --data '{"foo":"bar"}'