{"id":19829285,"url":"https://github.com/angular-schule/demo-ssr-playground","last_synced_at":"2025-10-04T23:14:43.243Z","repository":{"id":153529333,"uuid":"136985744","full_name":"angular-schule/demo-ssr-playground","owner":"angular-schule","description":"✅ Playground for SSR and Pre-Rendering with Angular","archived":false,"fork":false,"pushed_at":"2020-07-16T07:04:40.000Z","size":1828,"stargazers_count":28,"open_issues_count":4,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-01T14:44:58.449Z","etag":null,"topics":[],"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/angular-schule.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-11T22:02:40.000Z","updated_at":"2023-08-17T11:41:53.000Z","dependencies_parsed_at":"2023-05-19T05:15:20.270Z","dependency_job_id":null,"html_url":"https://github.com/angular-schule/demo-ssr-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angular-schule/demo-ssr-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-schule%2Fdemo-ssr-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-schule%2Fdemo-ssr-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-schule%2Fdemo-ssr-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-schule%2Fdemo-ssr-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angular-schule","download_url":"https://codeload.github.com/angular-schule/demo-ssr-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-schule%2Fdemo-ssr-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278386130,"owners_count":25978113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-12T11:18:16.555Z","updated_at":"2025-10-04T23:14:43.236Z","avatar_url":"https://github.com/angular-schule.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Playground for SSR and Prerendering with Angular\n\n### Installing and building\n\nInstall all dependencies as usual.\nJust to make sure everything is fine, run the project locally:\n\n```bash\nnpm install\nng serve\n```\n\nIf you want, you can take a look at the HTML source code in the browser. It should show the typical `index.html` skeleton with an almost empty `\u003capp-root\u003e\u003c/app-root\u003e` element.\n\nWe then need separate builds for client and server.\n\n```bash\n# Client\nng build --prod\n\n# Server\nng run ssr-playground:server:production\n\n\n# OR both together\nnpm run build:ssr\n```\n\nYou should now find a `dist` folder with two sub-directories:\n\n```\n- dist\n  - ssr-playground\n    - browser\n    - server\n```\n\nWe can take a look at the server now!\n\n### Compiling the server for SSR\n\nThe server part is a TypeScript program for Node.js in the `server.ts` file.\nIt is already bundled with the application in `dist/ssr-playground/server/main.js` after running `npm run build:ssr`.\n\n\n### Running Server-side rendering\n\nRun the Express server with live server-side rendering:\n\n```bash\nnode dist/ssr-playground/server/main\n# OR\nnpm run serve:ssr\n```\n\nOpen your browser at [http://localhost:4000](http://localhost:4000) to see it in action. When you show the source code in the browser you should see the server-side rendered HTML.\n\n\n#### Pre-rendering\n\n\n```bash\nnpm run prerender\n```\n\nYou should now find some subfolders in the `dist/browser` directory, according to the routes of the application.\nRun a local web server there, e.g. `angular-http-server` or `http-server`:\n\n```bash\ncd dist/ssr-playground/browser\nnpx http-server\n```\n\nOpen your browser at [http://localhost:8080](http://localhost:8080).\nThis should be blazing fast because it just shows the prerendered pages without doing any rendering at runtime.\nThe Angular application bundles will kick in later and take over the static page.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangular-schule%2Fdemo-ssr-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangular-schule%2Fdemo-ssr-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangular-schule%2Fdemo-ssr-playground/lists"}