Installation

  1. Install the module:
npm
npm install nuxt-server-utils
yarn
yarn add nuxt-server-utils
pnpm
pnpm add nuxt-server-utils
  1. Add nuxt-server-utils to the modules section of nuxt.config.ts:
nuxt.config.ts
export default defineNuxtConfig({
// ...
  modules: [
    'nuxt-server-utils',
  ],
})
  1. 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!