This Hello World starter app uses Express JS and starts a server and listens on a given port for connections. The app responds with “Hello World!” for requests to the root URL (/) or route. For every other path, it will respond with a 404 Not Found.
- Node.js is required to run this app
- Per the Express docs,
First create a directory named myapp, change to it and run npm init.
-
Then follow the steps to install express as a dependency, as per the installation guide.
-
Run the app with node app.js
-
Load http://localhost:3000/ in a browser to see the output.