@@ -3,16 +3,16 @@ import {
33 createNodeRequestHandler ,
44 isMainModule ,
55 writeResponseToNodeResponse ,
6- } from '@angular/ssr/node' ;
7- import express from 'express' ;
8- import { dirname , resolve } from 'node:path' ;
9- import { fileURLToPath } from 'node:url' ;
6+ } from '@angular/ssr/node'
7+ import express from 'express'
8+ import { dirname , resolve } from 'node:path'
9+ import { fileURLToPath } from 'node:url'
1010
11- const serverDistFolder = dirname ( fileURLToPath ( import . meta. url ) ) ;
12- const browserDistFolder = resolve ( serverDistFolder , '../browser' ) ;
11+ const serverDistFolder = dirname ( fileURLToPath ( import . meta. url ) )
12+ const browserDistFolder = resolve ( serverDistFolder , '../browser' )
1313
14- const app = express ( ) ;
15- const angularApp = new AngularNodeAppEngine ( ) ;
14+ const app = express ( )
15+ const angularApp = new AngularNodeAppEngine ( )
1616
1717/**
1818 * Example Express Rest API endpoints can be defined here.
@@ -35,7 +35,7 @@ app.use(
3535 index : false ,
3636 redirect : false ,
3737 } ) ,
38- ) ;
38+ )
3939
4040/**
4141 * Handle all other requests by rendering the Angular application.
@@ -46,21 +46,21 @@ app.use('/**', (req, res, next) => {
4646 . then ( ( response ) =>
4747 response ? writeResponseToNodeResponse ( response , res ) : next ( ) ,
4848 )
49- . catch ( next ) ;
50- } ) ;
49+ . catch ( next )
50+ } )
5151
5252/**
5353 * Start the server if this module is the main entry point.
5454 * The server listens on the port defined by the `PORT` environment variable, or defaults to 4000.
5555 */
5656if ( isMainModule ( import . meta. url ) ) {
57- const port = process . env [ 'PORT' ] || 4000 ;
57+ const port = process . env [ 'PORT' ] || 4000
5858 app . listen ( port , ( ) => {
59- console . log ( `Node Express server listening on http://localhost:${ port } ` ) ;
60- } ) ;
59+ console . log ( `Node Express server listening on http://localhost:${ port } ` )
60+ } )
6161}
6262
6363/**
6464 * The request handler used by the Angular CLI (dev-server and during build).
6565 */
66- export const reqHandler = createNodeRequestHandler ( app ) ;
66+ export const reqHandler = createNodeRequestHandler ( app )
0 commit comments