Skip to content

Instantly share code, notes, and snippets.

@ejfinneran
Created January 21, 2012 04:06
Show Gist options
  • Save ejfinneran/1651231 to your computer and use it in GitHub Desktop.
Save ejfinneran/1651231 to your computer and use it in GitHub Desktop.
Hubot via HTTP
module.exports = (robot) ->
http = require('http')
server = http.createServer((request, response) ->
params = require('url').parse(request.url, true)
message = params["query"]["message"]
response.writeHead(200, {"Content-Type": "text/plain"})
robot.msgRoom "[email protected]", message
response.end("Message Sent")
)
server.listen(1337, "127.0.0.1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment