Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Next.js + Dotenvx Examples

Examples for encrypting secrets with Dotenvx in Next.js projects.

Prerequisites

  • Node.js 22+
  • Optional: a Dotenvx account

Installation

cd javascript

# Install dependencies
npm install

# Encrypt your .env file
npx dotenvx encrypt

Next.js Application

JavaScript

cd javascript
npm run dev

# Then in the browser:
open http://localhost:3000/api

Project Structure

nextjs-dotenvx-examples/
├── README.md
└── javascript/
    ├── package.json
    ├── src/
    │   ├── app/
    │   │   └── api/
    │   │       └── route.js
    │   └── instrumentation.js
    └── next.config.mjs

Resources

License

MIT