On returning content # automagically detects content and set the right headers: res.send(returnhere) # explicitly return json objects: res.json(JSON.stringify(returnhere)) # you are more interested in sending http codes than actual return objects:
Category Archives: express
boostrapping a MEAN app (angular.js, express, node.js, mongodb)
Complete code example here – in the folder you are creating your app, place a manifest file called package.json, example: { “name”: “yourappnamehere” } – install express and other dependencies: $ sudo apt-get update $ sudo apt-get install npm $ sudo apt-get install nodejs Note: copying and pasting these commands sometimes will give you the following error message: […]