Deploy Elysia with Risved
Requires Risved 0.22.0 or newer.
Risved detects the elysia dependency. For a Bun application, select Bun as the server runtime when creating the project or under Settings → Build &
Runtime.
Build and start
Add this package.json build script:
"build": "bun build src/index.ts --target bun --outdir dist" Risved runs the build with Bun, preserves production dependencies, and starts bun dist/index.js. Keep packages needed at runtime in dependencies.
Listen on the container port
import { Elysia } from 'elysia'
new Elysia()
.get('/', () => 'Hello from Elysia')
.listen({
hostname: '0.0.0.0',
port: Number(process.env.PORT || 3000)
}) The internal port is 3000. Risved assigns a separate host port automatically.
Node.js applications
Node.js requires Elysia's Node adapter and a build targeting Node that produces dist/index.js. Select Node.js for that configuration. A Bun-targeted build cannot run on Node.js. See Elysia's Node guide.