NodeJS Web App

You'll learn how to create and deploy your first Node.js (Express) web app.

Prerequisites

Create your Node.js application

In this step, you create a basic Node.js application and ensure it runs on your computer.

Step 1: Create a Node.js application using the Express Generator, which is installed by default with Node.js and NPM.

npx express-generator myExpressApp --view ejs

Step 2: Change to the application's directory and install the NPM packages.

cd myExpressApp && npm install

Step 3: Start the development server with debug information.

DEBUG=myexpressapp:* npm start

Step 4: In a browser, navigate to http://localhost:3000. You should see something like this:

Last updated