HeliumTS is under active development and may have bugs or breaking changes. Report issues on GitHub.
Middleware
You can define a middleware to intercept requests to the server.
src/server/_middleware.ts
1import { middleware } from "heliumts/server";23export default middleware(async (ctx, next) => {4 console.log("Request received");5 // Add your database connection or auth logic here6 await next();7 //You can even add code after the request is handled8 console.log("Request ended");9});