Socket
Book a DemoInstallSign in
Socket

dotenv-next

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-next

Load environment variables in your scripts following the priority specification popularized by Next.js

0.1.24
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

dotenv-next

Load environment variables in your scripts following the priority specification popularized by Next.js.

This package is a thin wrapper around the internal @next/env package from Next.js. It adds an little register hook which allows your to register your environment variables at the top of script files.

#!/usr/bin/env node

import 'dotenv-next/register'

const main = async () => {
  await new Promise((resolve) =>
    setTimeout(() => {
      console.log(process.env.NODE_ENV)
    }, 1000),
  )
}

main()
  .catch((error) => {
    console.log(error)
    process.exit(1)
  })
  .finally(() => {
    process.exit(0)
  })

FAQs

Package last updated on 03 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.