Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var router = new Router()
router.addRoute("/events", require("./routes/events"))
router.addRoute("/events/current", require("./routes/events/current"))
router.addRoute("/events/:eventName", require("./routes/events/item"))
router.addRoute("/colingoClass/byHangoutId/:hangoutId"
, require("./routes/colingoClass/byHangoutId/item"))
router.addRoute("/colingoClass/byHangoutLink/:hangoutLink"
, require("./routes/colingoClass/byHangoutLink/item"))
router.addRoute("/colingoClass/:classId"
, require("./routes/colingoClass/class"))
//TODO: Normalize API names to all be rooted at colingoClass?
router.addRoute("/classes/upcoming", require("./routes/colingoClass/upcoming"))
router.addRoute("/classes/needsHangout", require("./routes/colingoClass/needsHangout"))
router.addRoute("/classes/needsHangout/:classId", require("./routes/colingoClass/needsHangout"))
router.addRoute("/class/:classId/hangout",
require("./routes/colingoClass/hangout"))
router.addRoute("/hangout-app/heartbeat",
require("./routes/hangout-app/heartbeat"))
router.addRoute("/hangout-app/events",
require("./routes/hangout-app/events"))
router.addRoute("/user/updateByUsername"
, require("./routes/user/updateByUsername"))
//TODO: Normalize API names to be rooted at hangoutvm?
router.addRoute("/hangoutvm/:vmId/status",
require("./routes/hangoutVm/status"))
router.addRoute("/hangoutVmStats",
require("./routes/hangoutVm/stats"))
router.addRoute("/stats/classPerformance",
require("./routes/stats/classPerformance"))
router.addRoute("/hangout/chat"
, require("./routes/hangout/chat"))
module.exports = handleRequest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.