- Print
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Using the express middleware with Nuxt.js
Run this command in your project.
npm install prerender-node --save
In the nuxt.config.js add a new middleware:
serverMiddleware: [
'~/prerender-middleware.js'
]
And the prerender-middleware.js :
const express = require('express')
const app = express();
app.use(require('prerender-node').set('prerenderToken', 'API TOKEN'));
module.exports = {
path: '/',
handler: app
}
Was this article helpful?