Nuxt logo Nuxt

Vault with Nuxt

Run your Nuxt application through the GitOps CLI to load Vault secrets as environment variables before the server starts.

Run your application with Vault

Use gops vault run -- followed by your usual Nuxt start command:

gops vault run \
	--api-url https://cloud.getgitops.com/api \
	--api-key "$GOPS_API_KEY" \
	--project-id 00000000-0000-0000-0000-000000000000 \
	--path / \
	--env production \
	-- node .output/server/index.mjs

For local development, select the appropriate Vault environment and use your framework's development command after --.

See the official Nuxt documentation for framework-specific environment and deployment guidance.

Use your environment variables

Secrets are available as environment variables only to the process launched by gops vault run. Read them through your framework's server-side environment API and keep private values out of browser bundles.