Skip to content

Commit 5cff66e

Browse files
committed
updates
1 parent ca9006d commit 5cff66e

File tree

6 files changed

+7
-24
lines changed

6 files changed

+7
-24
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ This project is a Angular (With SSR) + Nestjs monorepo using Nx. It is a full-st
88
Feel free to contribute to this project by creating a pull request.
99

1010
- [ ] Check on how to build for bun runtime
11-
- [ ] Pre rendering routes doesn't spin up the server, so the HTTP calls are not made.
11+
- [ ] Pre rendering routes doesn't spin up the server, so the HTTP calls are not working.
12+
- Wouraround: Use full api url's (http://localhost:4200/api) instead of relative url's (/api)
13+
- And spin up the api before building
1214
- [ ] Create a material included starter
1315

1416
## Directory Structure

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/server/main.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

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+
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ 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(() => this.httpClient.get(`/api/backend-test`));
1717
}

0 commit comments

Comments
 (0)