Skip to content

Commit

Permalink
update issues with nestjs and oak guides
Browse files Browse the repository at this point in the history
  • Loading branch information
HomelessDinosaur committed Jan 16, 2025
1 parent 6ed3c0c commit 5789066
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/guides/nodejs/nestjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ yarn add uuid
We will define our profiles [key value store](/keyvalue) and a Profile type at the top of our `app.service.ts` file. The key value store will have permissions for getting, setting, and deleting as we will be using all those features for our Profile service.

```typescript title:src/app.service.ts
import { Injectable, NotFoundException } from '@nestjs/common'
import { kv } from '@nitric/sdk'

export interface Profile {
Expand Down Expand Up @@ -254,7 +255,7 @@ We then want to add the `http` type to our main function, and pass in the Nest.j
set.
</Note>

```typescript title:src/app.module.ts
```typescript title:src/main.ts
import { http } from '@nitric/sdk'
import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'
Expand Down
11 changes: 9 additions & 2 deletions docs/guides/nodejs/oak.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To complete this guide you'll need the following:
Let's start by setting up a Nitric project:

```bash
nitric new oak-example js-starter
nitric new oak-example ts-starter-deno
```

Then install dependencies and add Oak:
Expand Down Expand Up @@ -125,7 +125,14 @@ Your oak application will now be running with Nitric acting as a proxy. We can t

```bash
curl http://localhost:4001/upload/a1b2c3d4e5
{ "url":"http://localhost:51714/write/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" }
```

It should return an upload URL.

```json
{
"url": "http://localhost:51714/write/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}
```

At this point, we can stop the running application and try to deploy it to a cloud provider.
Expand Down

0 comments on commit 5789066

Please sign in to comment.