This repo is the boilerplate for Angular Universal (serverside rendering) applications. It is running as a (PWA) progressive web app with the whole goodness of it (push messages, content caching and making it installable on the Android devices)! It is prepared to be easily deployed on serverless environment (like AWS Lambda).
This is a great starting point for microservices application! Because of support for external modules, you can split your application into separate projects and combine them together when deploying!
Angular Universal PWA on AWS Lambda + API Gateway
- PWA - content is cached and available offline, it can be also installed as native app on Android devices and Google Chrome
- AMP - Accelerated Mobile Pages - super fast initial load (down to ~650ms)
- Push notifications:
- Vapid webpush (Chrome and Firefox) - Using aws-sns-webpush as back-end
- Safari push - Using aws-sns-webpush as back-end
- Lazy loading modules
- External modules (You can split your application into multiple projects and lazy-load them, read more here)
- Angular Material
- Unit tests
- Webpack
- UglifyJS
- OptimizeJS
- DllPlugin (super fast reloading in development mode)
- Sass loader
- Serverless framework
git clone https://github.com/maciejtreder/angular-universal-pwa.git
cd angular-universal-serverless
npm install
npm start
- Development mode (autoreload only):
npm start
- Development mode (autoreload + unit tests):
npm run build:dev
- Unit tests:
npm run test
Includes AoT
npm run build:prod
npm run server
npm run build:deploy
- Google Cloud support
- microservices support - make replacement eligible external module without recompiling whole app
- ng-http-sw-proxy (all requests done offline, are synced when app comes back online) - not working since Angular 5.x (more info can be found in this issue)
- e2e tests
- load static content from S3 (JavaScript, styles, images):
- when serving all static content from S3 load speed up is not really visible (increase is around ~0,2 sec),
- problems with CORS on Chrome,
- problems with compression of some files (.js files are not compressed in some cases)
- needs a lot of manual setup (cloudfront setup etc.)
- Checkout my home page and find out more about me
- Built on top of ng-universal-demo