Skip to content

Instantly share code, notes, and snippets.

@xonev
Created December 5, 2013 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xonev/7811163 to your computer and use it in GitHub Desktop.
Save xonev/7811163 to your computer and use it in GitHub Desktop.
Test app to mock the experiments API.
express = require('express')
app = express()
app.post '/experiments/:name/start', (req, res) ->
message = "#{req.params.name} Started"
console.log message
res.send message
app.post '/experiments/:name/stop', (req, res) ->
message = "#{req.params.name} Stopped"
console.log message
res.send message
app.post '/experiments/:name/reset', (req, res) ->
message = "#{req.params.name} Reset"
console.log message
res.send message
app.listen(8080)
console.log "started on port 8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment