-
For Windows: https://blog.teamtreehouse.com/install-node-js-npm-windows
-
For Linux & MacOsx
https://yoember.com/nodejs/the-best-way-to-install-node-js/
On mac osx you will need to install the latest xcode from the app store prior to following the above instructions
- Create a simple 'hello world' server
- Demo npm init to create package.json and npm install to install packages.
- Launch the server
node hello_world.js - Add Capability to read a file from disk and return it in a response
- Use vscode debugger to run the server and set breakpoints. Make a request on 127.0.0.1:3000 to hit the breakpoints and inspect the server.
- For non vscode can use the --inspect flag
node --inspect hello_world.jsthen follow the instructions.