Skip to content

Commit f3c8d9f

Browse files
committed
feat(): server
1 parent 218b42d commit f3c8d9f

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

doc-angular/api/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
export default import('../dist/server/server.mjs').then((module) =>
2-
module.app(),
3-
);
1+
export default import('../dist/server/server.mjs').then((module) => module.app);

doc-angular/src/server.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
AngularNodeAppEngine,
33
createNodeRequestHandler,
4-
isMainModule,
54
writeResponseToNodeResponse,
65
} from '@angular/ssr/node';
76
import express from 'express';
@@ -53,12 +52,12 @@ app.use('/**', (req, res, next) => {
5352
* Start the server if this module is the main entry point.
5453
* The server listens on the port defined by the `PORT` environment variable, or defaults to 4000.
5554
*/
56-
if (isMainModule(import.meta.url)) {
57-
const port = process.env['PORT'] || 4000;
58-
app.listen(port, () => {
59-
console.log(`Node Express server listening on http://localhost:${port}`);
60-
});
61-
}
55+
// if (isMainModule(import.meta.url)) {
56+
// const port = process.env['PORT'] || 4000;
57+
// app.listen(port, () => {
58+
// console.log(`Node Express server listening on http://localhost:${port}`);
59+
// });
60+
// }
6261

6362
/**
6463
* Request handler used by the Angular CLI (for dev-server and during build) or Firebase Cloud Functions.

0 commit comments

Comments
 (0)