Skip to content

Commit

Permalink
fix(angular): generate correct server file when using webpack-based e…
Browse files Browse the repository at this point in the history
…xecutors
  • Loading branch information
leosvelperez committed Jul 19, 2024
1 parent 8b1c78c commit f18f204
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,15 @@ export function app(): express.Express {
// Example Express Rest API endpoints
// server.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('**', express.static(distFolder, {
maxAge: '1y',
index: 'index.html'
}));
server.get(
'*.*',
express.static(distFolder, {
maxAge: '1y',
})
);
// All regular routes use the Angular engine
server.get('**', (req, res, next) => {
server.get('*', (req, res, next) => {
const { protocol, originalUrl, baseUrl, headers } = req;
commonEngine
Expand Down Expand Up @@ -457,13 +459,15 @@ export function app(): express.Express {
// Example Express Rest API endpoints
// server.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('**', express.static(distFolder, {
maxAge: '1y',
index: 'index.html'
}));
server.get(
'*.*',
express.static(distFolder, {
maxAge: '1y',
})
);
// All regular routes use the Angular engine
server.get('**', (req, res, next) => {
server.get('*', (req, res, next) => {
const { protocol, originalUrl, baseUrl, headers } = req;
commonEngine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ export function app(): express.Express {
// Example Express Rest API endpoints
// server.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('**', express.static(distFolder, {
maxAge: '1y',
index: 'index.html'
}));
server.get(
'*.*',
express.static(distFolder, {
maxAge: '1y',
})
);

// All regular routes use the Angular engine
server.get('**', (req, res, next) => {
server.get('*', (req, res, next) => {
const { protocol, originalUrl, baseUrl, headers } = req;

commonEngine
Expand Down

0 comments on commit f18f204

Please sign in to comment.