Angular version: 13.1.3
- Angular Universal (server side rendering)
- i18n (Multi languages)
- Cache http requests state (server state to client state)
- Cookies
- Dotenv environments setup
- registerLocaleData (pt)
- ESLint
- Prettier
- Create a
.env
file in project root; - Use
.env.EXAMPLE
as example; - Exec
npm run config
command to generate TS environment file;
- There are two preconfigured languages,
pt-br
anden-us
; - You can add more creating
.json
files with language short name inassets/i18n/
; - To change language in runtime, use
LanguageService
to do this; - Read docs
- Persist data with cookie (Good to use in SSR, for auth, for example);
- Use
CookiesService
to manage cookies; - Read docs
- All success http requests are cached and transferred to client app (to avoid double requests);
- You can make changes in
BrowserStateInterceptor
to improve cache method;
- Exec
npm run prettier
to format files; - Read docs
- Exec
npm run lint
to analyze files; - Read docs
- Exec
npm run start
to run dev server; - Exec
npm run start:ssr
to run dev SSR server;
- Exec
npm run build
to build client app only; - Browser dist files are in
dist/my-app/browser
;
- Exec
npm run build:ssr
to build client and server; - Browser dist files are in
dist/my-app/browser
; - Server dist files are in
dist/my-app/server
;