Skip to content

Commit

Permalink
docs(deepkit): added more instructions to use deepkit in aws
Browse files Browse the repository at this point in the history
  • Loading branch information
H4ad committed Aug 5, 2022
1 parent 89b3b50 commit d401a8d
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions www/docs/main/frameworks/deepkit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import { HttpDeepkitFramework } from '@h4ad/serverless-adapter/lib/frameworks/de

const app = new App({
controllers: [],
module: [new HttpModule(), new FrameworkModule({
port: +process.env.PORT,
})],
module: [
new HttpModule(),
new FrameworkModule()
],
});

const router = app.get(HttpRouterRegistry);
Expand Down Expand Up @@ -61,3 +62,32 @@ Need more examples? See more examples [here](https://github.com/H4ad/serverless-
Is your application instance creation asynchronous? Look the [LazyFramework](./lazy) which helps you in asynchronous startup.

:::

## About AWS

I was only able to get Deepkit working when you deploy using NodeJS 16.x and using the `x86_64` architecture.

Also, I tried using the `serverless-offline` package and it throws an error about `could not find handler`, not sure why
I changed the deployment configuration to upload code manually. So if you like to use `serverless framework`, know
that you will have problems trying to test locally.

### FAQ

### ERR_DLOPEN_FAILED

Error message: /var/task/node_modules/turbo-net/build/Release/turbo_net.node: cannot open shared object file: No such file or directory
Solution: Change your lambda architecture to `x86_64`.

### ENOENT

Error message: no such file or directory, mkdir 'var/debug/'
Solution:

```ts
// change these options
new HttpModule({ debug: true }),
new FrameworkModule({ debug: true, httpLog: true }),
// for
new HttpModule({ debug: false }),
new FrameworkModule({ debug: false, httpLog: false }),
```

0 comments on commit d401a8d

Please sign in to comment.