VelaVela
Recipes

Node.js

Run a Vela application on Node.js.

Vela applications can run on Node.js using the @hono/node-server adapter.

Installation

npm install @hono/node-server

Setup

import { VelaFactory } from '@velajs/vela';
import { serve } from '@hono/node-server';
import { AppModule } from './app.module';

const app = await VelaFactory.create(AppModule);

serve({
  fetch: app.fetch,
  port: 3000,
});

Running

npx tsx src/main.ts
Edit on GitHub

Last updated on

On this page