Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit f68c967

Browse files
committed
nestjs fixes
1 parent f73be2d commit f68c967

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/guides/nodejs/nestjs.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,20 @@ export class ProfileService {
124124

125125
We can then create some handlers for creating profiles. This will accept a create profile request and return the newly created profile.
126126

127+
Install the `uuid` package to generate unique ids for the profiles.
128+
129+
```bash
130+
yarn add uuid
131+
```
132+
133+
Add the import to the top of the file.
134+
135+
```typescript title:profile/profile.service.ts
136+
import { v4 as uuidv4 } from 'uuid'
137+
```
138+
139+
Then add the handler changes.
140+
127141
```typescript title:profile/profile.service.ts
128142
@Injectable()
129143
export class ProfileService {
@@ -179,7 +193,7 @@ To run the application locally using Nitric, and to eventually deploy the applic
179193
name: nest-x-nitric
180194
services:
181195
- match: src/main.ts
182-
start: yarn dev
196+
start: yarn start
183197
```
184198
185199
We then want to add the `http` type to our main function, and pass in the Nest.js application. The `http` wrapper will use the `bootstrap` function when starting the application and pass it the port.

0 commit comments

Comments
 (0)