Skip to content

hany/etcdenv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%