Return more informative errors

This commit is contained in:
James Allen
2014-05-19 07:18:57 -04:00
parent 20219e0f2f
commit 2ea64cddc7
5 changed files with 50 additions and 13 deletions

View File

@@ -13,12 +13,13 @@ ProjectPersistenceManager = require "./app/js/ProjectPersistenceManager"
require("./app/js/db").sync()
express = require "express"
bodyParser = require "body-parser"
app = express()
app.use Metrics.http.monitor(logger)
app.post "/project/:project_id/compile", express.bodyParser(), CompileController.compile
app.del "/project/:project_id", CompileController.clearCache
app.post "/project/:project_id/compile", bodyParser.json(limit: "2mb"), CompileController.compile
app.delete "/project/:project_id", CompileController.clearCache
app.get "/project/:project_id/sync/code", CompileController.syncFromCode
app.get "/project/:project_id/sync/pdf", CompileController.syncFromPdf