Skip to content

Instantly share code, notes, and snippets.

@ejfinneran
Created December 14, 2011 07:15
Show Gist options
  • Save ejfinneran/1475587 to your computer and use it in GitHub Desktop.
Save ejfinneran/1475587 to your computer and use it in GitHub Desktop.
Hubot example script
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.messageRoom "[email protected]", message
response.end("Message Sent")
)
server.listen(8080, "127.0.0.1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment