const { Nuxt , Builder } = require ( 'nuxt' ) ; module . exports = function dashboardHttpHandler ( ) { const config = require ( './nuxt.config.js' ) ; const nuxt = new Nuxt ( config ) ; if ( nuxt . options . dev ) { new Builder ( nuxt ) . build ( ) ; } return ( req , res ) => nuxt . render ( req , res ) ; } ;