i want to run nuxt v3.11.2. but i don’t now nuxt.render is undefined in that version. I put the code inside file index.js. The code is in below
import main, { createHttpService } from "@tinqjs/tinjs-boot";
import express from "express";
import { build, loadNuxt } from "nuxt";
import cors from "cors";
const isDev = process.env.NODE_ENV !== "production";
const app = express();
app.use(cors());
main.default(async () => {
const nuxt = await loadNuxt({ dev: true });
if (isDev) {
await build(nuxt);
}
app.use(nuxt.renderer);
const listen = createHttpService(app);
listen(3001, () => {
console.log(`Service frontend nuxtjs ready`);
});
});
i want to run in custom server function.