I am currently looking for someone who has already prepared a starter kit with NestJS (back side) & NuxtJS (front side) with SSR (server side rendering), in TypeScript.
I would like to learn these two techno but I have not found enough help to build a project from scratch with them.
What interests me about Nuxt is this ease of creating pages, and for Nest, it’s pretty complete and easy to create APIs too.
I found some repositories on Github for quite a bit of old stuff and package updates make everything jump.
I created my proper project: https://github.com/pirmax/nuxt-and-nest But, either the API routes run on https://localhost:3000/api, or the Nuxt routes work if I remove the NuxtJS integration.
async function bootstrap() {
const nuxt = await new Nuxt(config);
config.dev = !(process.env.NODE_ENV === "production");
if (config.dev) {
await new Builder(nuxt).build();
}
const app = await NestFactory.create(AppModule);
await app.setGlobalPrefix("api");
await app.listen(3000, () => console.log("Application is listening on port 3000."));
await app.use(nuxt.render);
}
bootstrap();
Now, I have this error:
bundle export should be a function when using { runInNewContext: false }.
And if refresh page:
runner is not a function