N
Nuxt5mo ago
funk2351

How to return/render a Page/Component through API call?

Is this possible in Nuxt 3 to return/render certain Component on server side via api call?
- server
└── api
└── component.ts
- components
└── form.vue
- server
└── api
└── component.ts
- components
└── form.vue
export default defineEventHandler((event) => {

// render the specified component
return renderMethod('components/form.vue')
});
export default defineEventHandler((event) => {

// render the specified component
return renderMethod('components/form.vue')
});
Could someone guide me through the process or provide an example of how to accomplish this in Nuxt 3?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server