Once you have created an account on Doppler and created an API Key, you can proceed with the next steps.

Installation

Pick your package manager and install the SDK.

npm install @askdoppler/nuxt

Nuxt configuration

Edit nuxt.config.ts and add the following code:

  1. Append @askdoppler/nuxt to the modules array like so:
nuxt.config.ts
modules: [
  "@askdoppler/nuxt", // place first or in early positions if can't place first
  // ... other modules
];

Try to place it as early as possible in the modules array to ensure the middleware is prioritized.

  1. Add the following configuration object to your nuxt.config.ts file:
nuxt.config.ts
doppler: {
  apiKey: "your-api-key"
}

Test

To test that your setup is correctly working you can try asking ChatGPT or Perplexity to search for your websites URL. Data should start showing up right after your request.