Skip to content

Instantly share code, notes, and snippets.

@1syo
Created May 8, 2015 05:20
Show Gist options
  • Save 1syo/292ded6537f98d24538e to your computer and use it in GitHub Desktop.
Save 1syo/292ded6537f98d24538e to your computer and use it in GitHub Desktop.
httpで受け取った値をbrainしてsendする
# Description:
# spike
module.exports = (robot) ->
robot.router.get "/hubot/spike/:room", (req, res) ->
robot.brain.set('spike', req.params.room)
res.end "Done"
robot.respond /spike/i, (msg) ->
msg.send robot.brain.get('spike')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment