overleaf/services/web/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee

16 lines
372 B
CoffeeScript
Raw Normal View History

express = require("express")
app = express()
module.exports = MockDocUpdaterApi =
run: () ->
app.post "/project/:project_id/flush", (req, res, next) =>
res.sendStatus 200
app.listen 3003, (error) ->
throw error if error?
2017-10-20 10:31:10 -04:00
.on "error", (error) ->
console.error "error starting MockDocUpdaterApi:", error.message
process.exit(1)
MockDocUpdaterApi.run()