Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
var HTTP = require("q-io/http");
var Q = require("q");
var Queue = require("q/queue");
var port = 8000;
exports.QueueApp = function () {
var queue = Queue();
return function (request) {
if (request.method == "GET") {
return {
"status": 200,
"headers": {"Content-Type": "text/plain"},
"body": queue.get()
};
} else if (request.method == "POST") {
queue.put(request.body);
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.