Create the app

Previous step: Introduction and prerequisites

In this step, you use the Command Line Interface (CLI) for Angular, React, Vue or Svelte to create a simple app that can be deployed to Azure. You can alternately use any other JavaScript framework that produces a set of static files, or any folder that contains HTML, CSS or JavaScript files. If you already have an app ready to deploy, you can skip ahead to Create an Azure Storage account.

  1. Use the CLI to scaffold out a new app called "my-static-app" by running the following command:

    npx @angular/cli new my-static-app

    When the CLI asks any configuration questions, press enter to select the default options.

  2. Build the application by switching to the new folder and running npm run build:

    cd my-static-app
    npm run build
  3. You should now have a dist folder in the my-static-app folder. Inside that dist folder, there will be a folder with the same name as your project - my-static-app. The build/my-static-app folder contains the HTML, CSS, and JavaScript files that you deploy to Azure Storage.

  4. Run the app by using the following command:

    npm start
  5. Open a browser to http://localhost:4200 to verify that the app is running:

    The running sample Angular app

  6. Stop the server by pressing Ctrl+C in the terminal or command prompt.