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:
- Append
@askdoppler/nuxt to the modules array like so:
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.
- Add the following configuration object to your
nuxt.config.ts file:
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.