Giter VIP home page Giter VIP logo

abode's Introduction

Rizowski

abode's People

Contributors

gitter-badger avatar rizowski avatar waffle-iron avatar

Watchers

 avatar

Forkers

gitter-badger

abode's Issues

Environment Variable Spec

Some references:

Some ideas:

  • bitValue is optional, order is priority, first is prod, second is dev, last is local?

.env:

[
  {
    "env": "prod",
    "bitValue": "0b1000",
    "vars": [
      "PORT"
      "URL"
    ]
  },
  {
    "env": "dev",
    "bitValue": "0b1000",
    "vars": {
      "PORT": 3333,
      "URL": "http://something-dev.cool.com"
    }
  },
  {
    "env": "local",
    "bitValue": "0b1000",
    "vars": {
      "PORT": 4444,
      "URL": "http://localhost.com"
    }
  },
]

Environments can be assigned bit values

This can be useful if you want to include some features based on environment.

prod = 0b1000000000
dev = 0b100000000
local = 0b1000000
env.isProd(); // true | false
var environment = env.environment;
if(environment < env.PROD){
  // does dev and local stuff
} else {
 // console.log replaced with noop
}

Prod variables are only defined not writeable

This one might need to be reviewed. However I was thinking based on the files that are used in the environments; production variables can only be defined via getters. They cannot be set.

{
  "env": "prod",
  "variables": [ "RABBIT_HOST", "RABBIT_USERNAME" ]
}

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.