All Projects → mattn → Etcdenv

mattn / Etcdenv

Licence: mit

Programming Languages

go
31211 projects - #10 most used programming language

etcdenv

etcd + env = awesome!

env command integrated with etcd server

Usage

$ curl http://127.0.0.1:4001/v1/keys/app/db -d value="newdb"
$ curl http://127.0.0.1:4001/v1/keys/app/cache -d value="new cache"
$ curl http://127.0.0.1:4001/v1/keys/app2/db -d value="otherdb"

$ curl http://localhost:4001/v1/keys/app
[{"action":"GET","key":"/app/db","value":"newdb","index":4},{"action":"GET","key":"/app/cache","value":"new cache","index":4}]

$ etcdenv -key=/app/
DB=newdb
CACHE=new cache

$ etcdenv -key=/app/ ruby web.rb

$ etcdenv -key=/ -r
DB=newdb,otherdb
CACHE=new cache

Shebang

$ cat myapp.sh
#!/path/to/etcdenv -key=/myapp ./myapp.sh

If you are using OSs which the shell doesn't parse arguments separated with spaces, try to use -s option.

$ cat myapp.sh
#!/path/to/etcdenv -s -key=/myapp ./myapp.sh

Foreman/Goreman

$ cat Procfile
web: etcdenv -key=/myapp/ ruby web.rb

License

MIT: http://mattn.mit-license.org/2013

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].