A demo app for node
- event-emitter Example for Node Events( using http )
- file-uploads Example for File Uploads in node using Formidable module( using http )
- send-email Example for sending email using nodemailer package ( using http )
- sendfile-express Send an index.html file using res.sendFile ( with express ) to port 8080 where you can view it in the browser on
localhost://8080
. - path-example Example for using the path module that comes shipped with node.
- chrome-debugger Example for using Chrome Debugger
- Add a
debugger
in your code. - Run your file using command
node --inspect filename.js
- Open Chrome Tool in browser by going on
chrome://inspect/
- Click on Target > Inspect
- Now run your server at
http://localhost:5000
in browser. - It will hit the debugger and open the chrome developer tool . Then you can see the values of different variables and debug.
npm run dev
runs node on port 8080 by running server.js filenpm run dev:watch
runs node on port 8080 in watch mode by running server.js file