Skip to content

Commit 11c4fcc

Browse files
committed
📘 doc: cloudflare binding
1 parent 30b1c95 commit 11c4fcc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/integrations/cloudflare-worker.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,17 @@ Here are some known limitations of using Elysia on Cloudflare Worker:
7272

7373
1. `Elysia.file`, and [Static Plugin](/plugins/static) doesn't work [due to the lack of `fs` module](https://developers.cloudflare.com/workers/runtime-apis/nodejs/#supported-nodejs-apis)
7474
2. [OpenAPI Type Gen](/blog/openapi-type-gen) doesn't work [due to the lack of `fs` module](https://developers.cloudflare.com/workers/runtime-apis/nodejs/#supported-nodejs-apis)
75-
3. You cannot define [**Response** before server start](https://x.com/saltyAom/status/1966602691754553832), or use plugin that does so
75+
3. You can't define [**Response** before server start](https://x.com/saltyAom/status/1966602691754553832), or use plugin that does so
76+
4. You can't inline value
77+
78+
```typescript
79+
import { Elysia } from 'elysia'
80+
81+
new Elysia()
82+
// This will throw error
83+
.get('/', 'Hello Elysia')
84+
.listen(3000)
85+
```
7686

7787
## Static File
7888
[Static Plugin](/plugins/static) doesn't work, but you can still serve static files with [Cloudflare's built-in static file serving](https://developers.cloudflare.com/workers/static-assets/).

0 commit comments

Comments
 (0)