HackerTube.dev

Keeping Your Data Secure: Environment Variables in NextJS / React

Josh tried coding · 32.1K views · 2022-10-13 · 10:49

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

From the video description

Environment variables (.env) are THE way to keep your sensitive data like API keys secure and away from users. You define them in special .env.local files on your local machine and then define them wherever you deploy your React / NextJS project. While you can use secure .env variables in NextJS, due to the nature of React (being client-side rendered), you can only use public environment variables in React. To interact with APIs in React, you'd make a request to a NodeJS server that contains the server-side env variables.

Topics

Search by tags

Sources

Video by Josh tried coding, played through YouTube.

  • Indie Picks
Data and selection notes

Indie Picks uses video metadata for classification. The description above is an uploader excerpt, not an independent review.

Indie Picks: Independently collected SaaS and AI product videos, organized by a founder handbook. Topics and relevance are metadata-indexed; full-video editorial review has not been completed. Descriptions are uploader excerpts where available.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Matches the configured criteria
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources