2018-04-28 14:44:33 +00:00
|
|
|
const express = require("express");
|
|
|
|
const router = express.Router();
|
|
|
|
const bodyParser = require('body-parser');
|
2018-04-27 12:23:19 +00:00
|
|
|
|
|
|
|
//Routers
|
|
|
|
const UpdateRouter = require('./Routers/UpdateRouter');
|
2018-04-28 14:44:33 +00:00
|
|
|
const AccountRouter = require('./Routers/AccountRouter');
|
|
|
|
const FrameRouter = require('./Routers/FrameRouter');
|
|
|
|
|
|
|
|
|
|
|
|
// parse application/x-www-form-urlencoded
|
|
|
|
router.use(bodyParser.urlencoded({ extended: true }))
|
2018-04-27 12:23:19 +00:00
|
|
|
|
2018-04-28 14:44:33 +00:00
|
|
|
// parse application/json
|
|
|
|
router.use(bodyParser.json())
|
|
|
|
// bodyParser.parse('image/*') = function(req, options, next) {
|
|
|
|
// req.image = req.
|
|
|
|
// // for your needs it will probably be this:
|
|
|
|
// next();
|
|
|
|
// }
|
|
|
|
|
|
|
|
router.use('/update', UpdateRouter);
|
|
|
|
router.use('/account', AccountRouter)
|
|
|
|
router.use('/frame', FrameRouter)
|
2018-04-27 12:23:19 +00:00
|
|
|
module.exports = router;
|