router.js
454 Bytes
/**
* @author: huangtao
*/
'use strict';
const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
var multipart = require('connect-multiparty');
var multipartMiddleware = multipart();
const uploadCtrl = require(`${cRoot}/upload`);
const shopCtrl = require(`${cRoot}/shop`);
router.get('/', shopCtrl.index);
router.post('/upload', multipartMiddleware, uploadCtrl.uploadImg);
module.exports = router;