@ahrefs/bs-dotenv

2.0.0 • Public • Published

bs-dotenv

bs-dotenv is a package for bucklescript bindings to dotenv.

Installation

yarn add @ahrefs/bs-dotenv

or to follow master version:

yarn add https://github.com/ahrefs/bs-dotenv.git

Usage

Add @ahrefs/bs-dotenv to the bs-dependencies of bsconfig.json.

See original dotenv usage.

Example

Create a .env file:

VALUE1=demo1
VALUE2=demo2

Create a demo.re file:

Dotenv.config();

let _ =
  Js.log(Node.Process.process##env);

more examples here

Add the package as a dependency in bsconfig.json.

Run it:

$ nodejs src/demo.bs.js | grep demo
  VALUE1: 'demo1',
  VALUE2: 'demo2',

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i @ahrefs/bs-dotenv

    Weekly Downloads

    5

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    6.49 kB

    Total Files

    15

    Last publish

    Collaborators

    • denstr
    • bryanthomaschen
    • khady
    • rustykey
    • liubko
    • feihong
    • jchavarri
    • zindel
    • germes