NodeJS Web App
You'll learn how to create and deploy your first Node.js (Express) web app.
Prerequisites
Install Node.js and npm. Run the command
node --versionto verify that Node.js is installed.Install Visual Studio Code.
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 ejsStep 2: Change to the application's directory and install the NPM packages.
cd myExpressApp && npm installStep 3: Start the development server with debug information.
DEBUG=myexpressapp:* npm startStep 4: In a browser, navigate to http://localhost:3000. You should see something like this:

Last updated