#DATABASE_URL env var not found
1 messages · Page 1 of 1 (latest)
kk
Hi @dapper bluff 👋 , to make specific environment variables accessible to Next.js, you will need to modify the Amplify build specification file (amplify.yml) to set them in the environment files that Next.js recognizes. An example is outlined here: https://docs.aws.amazon.com/amplify/latest/userguide/ssr-environment-variables.html
Amplify Hosting supports adding environment variables to your application's builds by setting them in the project's configuration in the Amplify console. However, a Next.js server component doesn't have access to those environment variables by default. This behavior is intentional to protect any secrets stored in environment variables that your ...
Hey man i have done this. I can access the env var in the node process as in procces.env.XYZ but im not able to access the .env directly