rizowski / abode Goto Github PK
View Code? Open in Web Editor NEWSimple environments
License: MIT License
Simple environments
License: MIT License
Some references:
Some ideas:
.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"
}
},
]
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
}
I don't really like this idea too much, but maybe they can be optional depending on what they are. Something to think about.
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" ]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.