Giter Club home page Giter Club logo

node-env-variable-cli's Introduction

Set Node local environment variables

A command line tool for Node.js to export a list of environment key value pairs to an export.sh file; which can then be used as a part of a development script to set local environment variables.

Usage

  1. clone this repo git clone https://github.com/momotofu/node-env-variable-cli.git and copy set_env.sh to the same directory as your package.json file.
  2. Add the list of environment variables to APIServices array in the set_env.sh file. See file comments for an example and further instructions.
  3. To populate the script you'll use to set local env variables run source set_env.sh. This command will run the user through each environment variable key and prompt for the associated value. When user has entered all the required values, an exports.sh file will be generated.
  4. To export local environment variables add source exports.sh to your dev script in your package.json file.
     "scripts": {
         "dev": "source exports.sh; concurrently --kill-others \"webpack-dev-server --mode=development --progress --colors --port 2992\" \"NODE_ENV=development nodemon ./src/backend/app.js\"",
      }

node-env-variable-cli's People

Contributors

momotofu avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.