Add routes for basic app structure

This commit is contained in:
mmcwilliams 2017-08-22 00:00:24 -04:00
parent aca94c1ec9
commit 1c53af9215
2 changed files with 9 additions and 8 deletions

View File

@ -19,7 +19,10 @@ let app = restify.createServer({
function createServer () {
app.get('/', index)
app.all('/frame', rFrame)
app.get('/frame', rFrame)
app.post('/frame', rFrame)
app.get('/sequence', () => {})
app.post('/sequence', () => {})
app.get('/status', rStatus)
app.listen(PORT, () => {
console.log(`${APPNAME} listening on port ${PORT}!`)
@ -32,16 +35,11 @@ function rFrame (req, res, next) {
}
function rStatus (req, res, next) {
const obj = status()
res.send(obj)
const obj = intval.status()
res.send({})
return next()
}
function status () {
const obj = {}
return obj
}
function index (req, res, next) {
res.end(INDEX)
return next()

View File

@ -16,6 +16,9 @@ class Intval {
}
})
}
status () {
return {}
}
}
module.exports = new Intval()