clerk / clerk-docs

The documentation content for Clerk, an authentication and user management platform.
https://clerk.com/docs
79 stars 285 forks source link

Replace dotenv with @next/env in neon guide #1211

Closed kevinzunigacuellar closed 5 days ago

kevinzunigacuellar commented 6 days ago

[!IMPORTANT] 🔎 Previews:

-

Explanation

This PR removes the usage of dotenv from the neon guide. While a small change, it favors the use of framework-specific utility libraries and reduces unnecessary dependencies, thus simplifying the overall setup.

Changes Made

kevinzunigacuellar commented 5 days ago

Let's remove dotenv and next/env altogether, keep in the second check for the DB URL.

Thanks for the review Roy

Unfortunately, removing next/env from the drizzle.config file will cause an error because the Drizzle ORM CLI doesn’t rely on the Next.js server to run scripts, so these variables won't be available at runtime.

While it is possible to remove next/env from schema.ts, it’s a common practice to load environment variables at this point for scripts that run outside the Next.js server context.

kevinzunigacuellar commented 4 days ago

Thanks for the support @royanger 🎉