Step 8: To run the app, add the following at the
bottom:
app.listen(3000)
The 3000 is a port number. A server can run many apps at the same
time, and they are separated by port numbers. Node apps typically run
on port 3000. Type the following on the command line:
node server.js
The server is now running and listening for requests. Simulate a
client by opening a browser, and typing the following in the address
bar:
localhost:3000
You should see hello world in the browser. If you want to change the
message, first stop the app by pressing Ctrl + C on the command line.
Then press the up arrow to run the previous command again.