Skip to content

Commit

Permalink
Implemented SSR structure on Angular app, serving rendered pages thro…
Browse files Browse the repository at this point in the history
…ugh Node
  • Loading branch information
eightants committed Oct 28, 2020
1 parent 76c6021 commit 194d853
Show file tree
Hide file tree
Showing 53 changed files with 5,373 additions and 3,759 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
dist

serviceAccountKey.json
.vercel
.now
.env.build
.env
Expand Down
34 changes: 29 additions & 5 deletions application/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/",
"outputPath": "dist/browser",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets",
"src/ssr"
"src/assets"
],
"styles": [
"src/styles.scss",
"src/bs.css",
"src/bs.css",
"node_modules/quill/dist/quill.core.css",
"node_modules/quill/dist/quill.snow.css",
"node_modules/primeicons/primeicons.css",
Expand All @@ -39,7 +38,9 @@
"node_modules/ngx-owl-carousel-o/lib/styles/prebuilt-themes/owl.carousel.min.css",
"node_modules/ngx-owl-carousel-o/lib/styles/prebuilt-themes/owl.theme.default.min.css"
],
"scripts": ["node_modules/marked/lib/marked.js"]
"scripts": [
"node_modules/marked/lib/marked.js"
]
},
"configurations": {
"production": {
Expand Down Expand Up @@ -127,6 +128,29 @@
"devServerTarget": "application:serve:production"
}
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/server",
"main": "src/main.server.ts",
"tsConfig": "tsconfig.server.json"
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"sourceMap": false,
"optimization": {
"scripts": false,
"styles": true
}
}
}
}
}
}},
Expand Down
Loading

0 comments on commit 194d853

Please sign in to comment.