After donwloading the repository, create a file under the Client/src/api folder with the name of local.settings.json containing the following configuration:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}
- Install Dependencies Run npm install to get the development environment ready.
./Client> npm i
- Run Azurite
// Open a Command Line and run the following:
> azurite
- Run the Taskify.API project
Open the VS Solution under the Server folder, and run the Taskify.API project.
- Run the Angular Front End on a separate command line.
./Client> ng serve
By this point you should have the Server side running on the port 7155
and the Angular App running on port 4200
- You may now start the SWA CLI
./Client> npm run start:swa
This will make your app visible at localhost:4280
The web app requires an Azure Storage Account to be created. You can follow instructions here: Create an Azure Storage Account
Once you have the storage account created, you can proceed to create the Azure Static Web App.
- On your azure portal go to the top left burger menu, and select
Create a Resource
- Search for
Static Web App
using the search bar at the top. - Select the first option that appears, and click on
Create
- Go to your storage account, and on the left pane select
Access Keys
- Under
key1
copy theConnection String
by clicking Show and then Copy to Clipboard. - Go to your Static Web App and and select
Configuration
under the Settings menu to the left. - Add a new Application Setting with name
AzureWebJobsStorage
and paste your connection string on the Value field. - Click on
Save
to save the changes.
- Under your Static Web App Overview, find the
Manage deployment token
option in the top menu. - Copy the Deployment Token to clipboard.
- Go to your GitHub repository page, and go to Settings > Secrets > Actions
- Click on button with label
New repository secret
- Paste your token on the Secret field, and set the name of your secret as
SWA_DEPLOYMENT_TOKEN
- Save Changes
- Go to the
Actions
tab in GitHub - Select the workflow
Azure Static Web Apps Deployment
- Click on
Run workflow
- Run the workflow for branch main.