Nodejs Hello World for codepipes running on codepipes/codepipes-nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("HTTP method", process.env.HTTP_METHOD); | |
console.log("HTTP header", process.env.HTTP_HEADER); | |
console.log("HTTP query", process.env.HTTP_QUERY); | |
console.log("HTTP body", process.env.HTTP_BODY); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var npm = require("npm"), | |
querystring = require("querystring"); | |
if(process.env.CHANNEL && process.env.PUBLISH_KEY && process.env.SUBSCRIBE_KEY) { | |
npm.load({}, function (err) { | |
npm.commands.install(["pubnub"], function (err) { | |
var header, body; |
Nodejs Echo for codepipes running on codepipes/codepipes-nodejs
Nodejs Dump for codepipes running on codepipes/codepipes-nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var npm = require("npm"), | |
querystring = require("querystring"); | |
if(process.env.CONNECTION_STRING && process.env.INDEX && process.env.TYPE) { | |
npm.load({}, function (err) { | |
npm.commands.install(["elasticsearch"], function (err) { | |
var header, body; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sig Store { objects : set Object, revision : Int } | |
sig Object { kind : String, name : String, namespace : String } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fact { | |
all r : ReadObject { | |
some s : Server { | |
s.revision >= r.revision | |
r.result = {o : s.objects | o.kind = r.kind and o.name = r.name and o.namespace = r.namespace} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sig Object {kind : Kind, name : Name, namespace : Namespace, mod : Int} | |
pred eq(o, o' : Object) { | |
o.kind = o'.kind and o.name = o'.name and o.namespace = o'.namespace | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sig Server {objects : set Object, rev : Int} | |
fact { | |
all s : Server { | |
all disj o, o' : s.objects | not eq[o, o'] | |
} | |
} |
OlderNewer