@alx13/dotenv-exec
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@alx13/dotenv-exec

Description

Parse .env file with dotenv and exec app like exec(3) POSIX call with kexec

Installation

npm install --save-dev @alx13/dotenv-exec

Usage

Add to package.json:

{
  "scripts": {
    "dev": "dotenv-exec -E .env -f -- ./app.js -f"
  }
}

Don't forget to use -- to separate command flags from dotenv-exec or npm flags.

app.js [options] <cmd> <args>

Options:
  --help       Show help
  --version    Show version number
  --encoding   Encoding of .env file ["ascii", "base64", "binary", "hex", "latin1", "ucs2", "utf16le", "utf8"] [default: "utf8"]
  --env, -E    Location of .env file relative to current working directory [default: ".env"]
  --force, -f  Override setted env variables from .env file [default: false]

Contributors

License

MIT

Package Sidebar

Install

npm i @alx13/dotenv-exec

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

8.32 kB

Total Files

8

Last publish

Collaborators

  • alx13