2. Create the app code using Express

Clone a GitHub repository with an example Express.js application, install the npm dependencies, and run the app locally.

Create a local Express.js app

Create and run an Express.js app by cloning an Azure sample repository.

  1. At a terminal command prompt, go to the directory location where you want to create the app folder.

  2. Use the following bash command with git to clone the repository, change into the repository folder named myexpressapp, then install the npm dependencies.

    git clone https://github.com/Azure-Samples/js-e2e-express-server.git myexpressapp && \
        cd myexpressapp && \
        npm install
    

Run your local Express.js app

  1. Start the server:

    npm start
    
  2. Test the app by opening a browser to http://localhost:3000. The site should appear as follows:

    Browser screenshot displaying Express.js app.

  3. Press Ctrl + c in the terminal to stop the server.

Next step