File tree Expand file tree Collapse file tree 7 files changed +10
-7
lines changed
Expand file tree Collapse file tree 7 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ async function bootstrap() {
1212 const app = await NestFactory . create ( AppModule ) ;
1313 const globalPrefix = 'api' ;
1414 app . setGlobalPrefix ( globalPrefix ) ;
15+ app . enableShutdownHooks ( ) ;
1516 const port = process . env . PORT || 3000 ;
1617 await app . listen ( port ) ;
1718 Logger . log (
1819 `🚀 Application is running on: http://localhost:${ port } /${ globalPrefix } ` ,
1920 ) ;
2021}
21-
2222bootstrap ( ) ;
Original file line number Diff line number Diff line change 3737 " class-validator"
3838 ],
3939 "scripts" : [],
40- "prerender" : false ,
40+ "prerender" : true ,
4141 "ssr" : {
4242 "entry" : " apps/app/server/server.ts"
4343 }
Original file line number Diff line number Diff line change 11import { bootstrapApplication } from '@angular/platform-browser' ;
22import { RootComponent , config } from '@app/frontend-root' ;
3-
43const bootstrap = ( ) => bootstrapApplication ( RootComponent , config ) ;
54
65export default bootstrap ;
6+
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ import { BackendTestModule } from '@backend/test';
66 controllers : [ ] ,
77} )
88export class AppModule { }
9-
9+
Original file line number Diff line number Diff line change 11< h1 > Welcome app!</ h1 >
22
3- <!-- < pre>{{ movie() | json }}</pre> -- >
3+ < pre > {{ movie() | json }}</ pre >
44
55< router-outlet > </ router-outlet >
Original file line number Diff line number Diff line change @@ -13,5 +13,7 @@ import { derivedAsync } from 'ngxtension/derived-async';
1313} )
1414export class RootComponent {
1515 private readonly httpClient = inject ( HttpClient ) ;
16- // movie = derivedAsync(() => this.httpClient.get(`/api/backend-test`));
16+ movie = derivedAsync ( ( ) =>
17+ this . httpClient . get ( `http://localhost:3000/api/backend-test` ) ,
18+ ) ;
1719}
Original file line number Diff line number Diff line change 44 "license" : " MIT" ,
55 "scripts" : {
66 "start" : " nx run-many -t serve -p tag:scope:app" ,
7- "build" : " nx build"
7+ "build" : " concurrently \" nx serve api\" \" bun run wait-and-build\" --kill-others --success last --kill-signal SIGINT" ,
8+ "wait-and-build" : " wait-on tcp:3000 && nx build app"
89 },
910 "private" : true ,
1011 "dependencies" : {
You can’t perform that action at this time.
0 commit comments