Skip to content

Commit

Permalink
hack: not render diaktoll on server side
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoDCube committed Feb 7, 2022
1 parent 5f5363d commit c0caecd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@
"outputPath": "dist/frontend/server",
"main": "apps/frontend/server.ts",
"tsConfig": "apps/frontend/tsconfig.server.json",
"externalDependencies": ["@firebase/firestore"]
"externalDependencies": [
"@firebase/firestore",
"canvas"
]
},
"configurations": {
"production": {
Expand Down
4 changes: 4 additions & 0 deletions apps/frontend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export function app(): express.Express {
})
)

server.get('/misc/diaktoll', (req, res) => {
res.sendFile(distFolder + '/index.html');
});

// All regular routes use the Universal engine
server.get('*', (req, res) => {
res.render(indexHtml, { req, providers: [{ provide: APP_BASE_HREF, useValue: req.baseUrl }] })
Expand Down

0 comments on commit c0caecd

Please sign in to comment.