https://github.com/hbweb/angular-ssr
Angular 17 with static pages + Tailwind
https://github.com/hbweb/angular-ssr
angular angular-ssr tailwindcss typescript
Last synced: 10 months ago
JSON representation
Angular 17 with static pages + Tailwind
- Host: GitHub
- URL: https://github.com/hbweb/angular-ssr
- Owner: hbweb
- Created: 2024-03-25T08:55:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-08T06:14:05.000Z (over 1 year ago)
- Last Synced: 2025-01-29T20:37:58.958Z (about 1 year ago)
- Topics: angular, angular-ssr, tailwindcss, typescript
- Language: TypeScript
- Homepage:
- Size: 4.99 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DTM Portal UI
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.1.1.
This project come with Angular SSR supported. However, we only use `prerender` feature for static pages as this app only have one single static homepage for now.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build & Pre-render
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
Run `npm run prerender` to prerender static pages for this project. The build artifacts will be stored in the `dist/browser` & `dist/server` directory.
## Pipeline & Deployment
Since we don't actually use Server Side Rendering (SSR) at least in the scope of this application, we only care about the `dist/browser` folder. Hence, these static pages would need to zip up and deploy to our server.
Please follow these steps:
Run `npm i`
Run `npm run prerender`
Once all files have been compiled and generated, we just need to copy all files under `dist/browser` folder onto our server. Alternatively, run this script to test it locally.
Run `npm run serve:ssr` to start a Node express server to server `dist/browser` web-root.