Reputation: 378
is there a way to export a nuxt.js project as an Express Middleware ? also I want the Nuxt project files to be outside my Express project.
my scenario is that i want to add admin dashboard Front-End page , into my Back-End project.
Nuxt.render generates a Express Middleware but i don't know how to export the middleware.
what i'm looking for :
//backend/app.js
...
const nuxt_middleware = require('../front_project/nuxt_module');
express_app.use('/admin',await nuxt_middleware())
...
Upvotes: 0
Views: 764
Reputation: 4067
for me, I had the same problem but I found the best way is to start new nuxt js project and then try to copy your codes, you can go with nuxt installation to create new nuxt js app
Upvotes: 1