Skip to content
Our Sponsors
Open in Anthropic

Integration with Deno

Elysia is built on top of Web Standard Request/Response, allowing us to run Elysia with Deno.serve directly.

To run Elysia on Deno, wrap Elysia.fetch in Deno.serve

typescript
import { Elysia } from 'elysia'

const app = new Elysia()
	.get('/', () => 'Hello Elysia')
	.listen(3000) 

Deno.serve(app.fetch) 

Then you can run the server with deno serve:

bash
deno serve --watch src/index.ts

This is all you need to run Elysia on Deno.

Change Port Number

You can specify the port number in Deno.serve.

ts
Deno.serve(app.fetch) 
Deno.serve({ port:8787 }, app.fetch)