This is medium clone sample project created to understand and comprehend working mechanism of angular and server side rendering process. It includes fetures like seo optimization and pwa.
http://medium-puzan.herokuapp.com/
username: admin@gmail.com
password: password123
Heroku postgres requires following properties to be configured in driver
ssl:true
sslFacctory:org.postgresql.ssl.NonValidatingFactory
heroku login
heroku run bash
git push heroku master
git remote add heroku 'reponame.git'
Seed file is available in 'server/documentation' folder.
This project was generated with Angular CLI version 7.0.6.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
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
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
Following file are added or modified inorder to achieve server side rendering.
- [modified] app.module.ts
- [added] app.server.module.ts
- [added] main.server.ts
- [added] tsconfig.server.json
- [modified] angular.json
- [added] server.ts
- [added] webpack.server.config.ts (mode should be none and optimizer should be false)