Giter Site home page Giter Site logo

envexp's Introduction

envexp

Export environment variables to a json or javascript file

Use case

One use case for this small cli tool is to enable runtime variables when deploying a create-react-app web-app with Docker. The idea consists in using a env.js script included from index.html. This script sets the window._env property with environment variables. However, this script must be created during start up of your docker container.

With envexp tool you can create the env.js script easily before start serving your web-app.

Fore more details read this issue.

Usage Examples:

Basic export

./envexp -t json > env.json
./envexp -t web > env.js

Export environment variables starting with prefix

./envexp -t json -prefix REACT_APP_ > env.json
./envexp -t web -prefix REACT_APP_ > env.js

Basic export with pretty output

./envexp -p -t json > env.json
./envexp -p -t web > env.js

envexp's People

Contributors

d3ce1t avatar

Watchers

 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.