Platforms
Envlet on Vercel
One ENVLET_TOKEN in Vercel project settings. Your functions and server components inject the rest at boot.
Set the token
vercel env add ENVLET_TOKEN productionInject at boot
import { inject } from "@envlet/sdk";
export async function register() {
await inject();
}Set up
- 01
Create a token
Create an identity for Vercel and a token for the environment it deploys.
- 02
Set one secret
Add ENVLET_TOKEN as a Vercel environment variable for each environment, production, preview, and development, each with its own Envlet token.
- 03
Start through Envlet
Call inject() in instrumentation.ts (Next.js) or at the top of your server entry. Edge functions use load() and read the returned object.
Questions
- Will my app start if Envlet is down?
- No, and that is the point. It retries for a few seconds, then fails so you notice, instead of starting with half an environment.
- Do I still need Vercel's own secret store?
- Only for ENVLET_TOKEN. Everything else lives in Envlet, so you rotate in one place.