{"id":37573977,"url":"https://github.com/richardrigutins/angular-universal-swa-basic","last_synced_at":"2026-01-16T09:27:54.944Z","repository":{"id":126164149,"uuid":"600761841","full_name":"richardrigutins/angular-universal-swa-basic","owner":"richardrigutins","description":"An Angular Universal sample for deploying to Azure Static Web Apps","archived":false,"fork":false,"pushed_at":"2024-03-28T20:51:41.000Z","size":4301,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-28T21:54:10.873Z","etag":null,"topics":["angular","angular-universal","azure","azure-static-web-apps","template"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/richardrigutins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-12T14:24:01.000Z","updated_at":"2023-07-18T09:22:39.000Z","dependencies_parsed_at":"2024-03-22T00:46:28.625Z","dependency_job_id":null,"html_url":"https://github.com/richardrigutins/angular-universal-swa-basic","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/richardrigutins/angular-universal-swa-basic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Fangular-universal-swa-basic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Fangular-universal-swa-basic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Fangular-universal-swa-basic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Fangular-universal-swa-basic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardrigutins","download_url":"https://codeload.github.com/richardrigutins/angular-universal-swa-basic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Fangular-universal-swa-basic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-universal","azure","azure-static-web-apps","template"],"created_at":"2026-01-16T09:27:54.861Z","updated_at":"2026-01-16T09:27:54.919Z","avatar_url":"https://github.com/richardrigutins.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Universal SWA basic\n\nUse this repo with to build and customize a new static [Angular Universal](https://angular.io/guide/universal) application with [Azure Static Web Apps](https://docs.microsoft.com/azure/static-web-apps/overview).\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli), using Angular 15.1.\n\n## Useful scripts\n\n### Setup\n\nRun `npm install` to install the dependencies.\n\n### Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.\n\nTo use server-side rendering on your local system with Universal, run `npm run dev:ssr` instead and navigate to `http://localhost:4200/`. Similarly to the `ng serve` command, the application will automatically reload if you change any of the source files.\n\n### Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n### Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\nTo build the project with server-side rendering with Universal, run `npm run build:ssr` instead.\n\n### Prerendering\n\nTo prerender your application's pages, run `npm run prerender`. The prerendered files will be stored in the `dist/angular-universal-swa-basic/browser` directory.\n\n### Running with the SWA emulator\n\nTo run your application with the [Azure Static Web Apps emulator](https://docs.microsoft.com/azure/static-web-apps/local-development), first build the application with `npm run swa:build`. Then, run `npm run swa:start` to start the emulator. The browser will automatically open to the application's URL.\n\n### Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n### Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.\n\n### Linting\n\nRun `ng lint` to execute the linter.\n\n### Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.\n\n## Developing inside a container\n\nThis repo contains a [devcontainer](https://code.visualstudio.com/docs/remote/containers) configuration that can be used to develop the application in a container. To use the devcontainer, you must have [Docker](https://www.docker.com/) and [Visual Studio Code](https://code.visualstudio.com/) installed. Then, open the repo in Visual Studio Code and follow the prompts to reopen the repo in a container. The devcontainer will install the necessary dependencies and extensions for the application.\n\nTo launch the application in the devcontainer, run `ng start:devcontainer`. The application will be available at `http://localhost:4200/`.\n\n## Deploying to Azure Static Web Apps\n\n### Using GitHub Actions\n\nThis repository contains a GitHub Actions workflow template that can be used to deploy the application to Azure Static Web Apps. To set up the workflow, you can either:\n\n* Remove the __.template__ extension from the __.github/workflows/azure-static-web-apps.ymltemplate__ file, replace the secrets in the file with your own values, and commit the changes to the__main__ branch. The workflow will then be triggered automatically.\n* Use an existing workflow file. To build an Angular Universal application, specify the custom build command and the output directory in the workflow file:\n\n```yaml\n- name: Build And Deploy\n  id: builddeploy\n  uses: Azure/static-web-apps-deploy@v1\n  with:\n    azure_static_web_apps_api_token: ${{ secrets.YOUR_API_TOKEN }} # Replace with the name of your secret\n    repo_token: ${{ secrets.GITHUB_TOKEN }}\n    action: \"upload\"\n    app_location: \"/\"\n    output_location: \"dist/angular-universal-swa-basic/browser\" # Change this; uses the output location of the Angular Universal application\n    app_build_command: \"npm run prerender -- --routes-file routes.txt\" # Add this; uses the prerender command to build the Angular Universal application\n    # app_build_command: \"npm run prerender -- --routes-file routes.txt\" # Use this instead if you have a custom routes file\n```\n\nThe workflow will then be triggered automatically when you push to the __main__ branch, and it will deploy the application to Azure Static Web Apps.\n\n### Using the Static Web Apps CLI\n\nTo deploy the application to Azure Static Web Apps using the [Static Web Apps CLI](https://azure.github.io/static-web-apps-cli/), run the following commands:\n\n- `npm run swa:login` to log in to Azure.\n- `npm run swa:build` to build the application.\n- `npm run swa:deploy` to deploy the application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardrigutins%2Fangular-universal-swa-basic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardrigutins%2Fangular-universal-swa-basic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardrigutins%2Fangular-universal-swa-basic/lists"}