To support running locally, the starter project is configured with a dev container. The container has the following resources:
- Node.js
- Azure Functions Core Tools
- MongoDB
To run the project, you will need the following:
- Clone the repository you created earlier when deploying to Azure, or create a copy from the template and clone your copy
git clone <YOUR REPOSITORY URL HERE>
cd <YOUR REPOSITORY NAME>
- Open the project in Visual Studio Code
code .
-
When prompted inside Visual Studio Code, select Reopen in Container. The container will build, and Visual Studio Code wil refresh.
-
Inside Visual Studio Code, open a terminal window by selecting View > Terminal, and execute the following code to install the packages and run the site
npm dev:install
npm run dev
Your project will now start!
- Navigate to http://localhost:4280 to use your site
NOTE You might be prompted to open a different port. The Azure Static Web Apps CLI will host the project on port 4280.