SDK
Integrate Novu with H3
SDK
Integrate Novu with H3
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);
Was this page helpful?