Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #9 from mintplant/master

Added in environment variable setting and deleting.
  • Loading branch information...
commit 228511d96f74b72185d9c7d5ff7b5ea6fcc0921d 2 parents 5953979 + 97f75b6
@nodester authored
Showing with 20 additions and 0 deletions.
  1. +16 −0 lib/nodester.js
  2. +4 −0 src/nodester.coffee
View
16 lib/nodester.js
@@ -196,6 +196,22 @@
return this.get("appdomains", cb);
};
+ Nodester.prototype.env_set = function(name, key, value, cb) {
+ return this.put("env", {
+ appname: name,
+ key: key,
+ value: value
+ }, cb);
+ };
+
+ Nodester.prototype.env_delete = function(name, key, cb) {
+ return this.del("env/" + (escape(name)) + "/" + (escape(key)), cb);
+ };
+
+ Nodester.prototype.env_get = function(name, cb) {
+ return this.get("env/" + (escape(name)), cb);
+ };
+
return Nodester;
})();
View
4 src/nodester.coffee
@@ -68,6 +68,10 @@ class Nodester
appdomain_delete: (name, domain, cb) -> @del "appdomains", {appname: name, domain: domain}, cb
appdomains: (cb) -> @get "appdomains", cb
+
+ env_set: (name, key, value, cb) -> @put "env", {appname: name, key: key, value: value}, cb
+ env_delete: (name, key, cb) -> @del "env/#{escape(name)}/#{escape(key)}", cb
+ env_get: (name, cb) -> @get "env/#{escape(name)}", cb
handleResponse = (cb) ->
return (err, res, body) =>
Please sign in to comment.
Something went wrong with that request. Please try again.