27 lines
822 B
JavaScript
27 lines
822 B
JavaScript
const express = require("express");
|
|
const router = express.Router();
|
|
const bodyParser = require('body-parser');
|
|
|
|
//Routers
|
|
const UpdateRouter = require('./Routers/UpdateRouter');
|
|
const AccountRouter = require('./Routers/AccountRouter');
|
|
const FrameRouter = require('./Routers/FrameRouter');
|
|
const UserRouter = require('./Routers/UserRouter');
|
|
|
|
|
|
// parse application/x-www-form-urlencoded
|
|
router.use(bodyParser.urlencoded({ extended: true }))
|
|
|
|
// 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);
|
|
router.use('/user', UserRouter);
|
|
module.exports = router;
|