Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Node.js + Dotenvx Examples

Comprehensive examples for encrypting secrets with Dotenvx in Node.js.

Prerequisites

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

JavaScript

cd javascript
npm install
npx dotenvx encrypt
node index.js

TypeScript

cd typescript
npm install
npx dotenvx encrypt
npx tsx index.ts

Quick Usage

require('@dotenvx/dotenvx').config()

console.log('HELLO:', process.env.HELLO)

Project Structure

nodejs-dotenvx-examples/
├── javascript/
│   ├── index.js
│   └── package.json
├── typescript/
│   ├── index.ts
│   ├── package.json
│   └── tsconfig.json
└── README.md