Installation
- Install the module:
npm
npm install nuxt-server-utils
- Add
nuxt-server-utils
to themodules
section ofnuxt.config.ts
:
nuxt.config.ts
export default defineNuxtConfig({
// ...
modules: [
'nuxt-server-utils',
],
})
- Configuration
nuxt.config.ts
export default defineNuxtConfig({
// ...
modules: ["nuxt-server-utils"],
nuxtServerUtils: {
enabled: true, // default
enableDevTools: true, // default
mongodbUri: process.env.MONGODB_URI,
},
});
You're ready to go!