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())
                  
                  
                  ...
                  
                  
                
you probably want to export a function like: app(options) -> Middleware
Обсуждают сегодня