Skip to content

Commit 70a2af0

Browse files
committed
chore: merge other starter udpates
1 parent 27416b9 commit 70a2af0

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

apps/api/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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-
2222
bootstrap();

apps/app/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"class-validator"
3838
],
3939
"scripts": [],
40-
"prerender": false,
40+
"prerender": true,
4141
"ssr": {
4242
"entry": "apps/app/server/server.ts"
4343
}

apps/app/src/main.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { bootstrapApplication } from '@angular/platform-browser';
22
import { RootComponent, config } from '@app/frontend-root';
3-
43
const bootstrap = () => bootstrapApplication(RootComponent, config);
54

65
export default bootstrap;
6+

libs/backend/root/src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import { BackendTestModule } from '@backend/test';
66
controllers: [],
77
})
88
export class AppModule {}
9-
9+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h1>Welcome app!</h1>
22

3-
<!-- <pre>{{ movie() | json }}</pre> -->
3+
<pre>{{ movie() | json }}</pre>
44

55
<router-outlet></router-outlet>

libs/frontend/root/src/root/root.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ import { derivedAsync } from 'ngxtension/derived-async';
1313
})
1414
export 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
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
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": {

0 commit comments

Comments
 (0)