Skip to main content

Documentation Index

Fetch the complete documentation index at: https://v0.x-docs.novu.co/llms.txt

Use this file to discover all available pages before exploring further.

import { createApp, eventHandler, toNodeListener } from "h3";
import { serve } from "@novu/framework/h3";
import { createServer } from "node:http";
import { myWorkflow } from "./novu/workflows";

const app = createApp();
app.use(
  "/api/novu",
  eventHandler(
    serve({
      workflows: [myWorkflow],
    })
  )
);

createServer(toNodeListener(app)).listen(process.env.PORT || 3000);