server-handler.js
574 Bytes
const express = require('express');
const multipart = require('connect-multiparty');
const passport = require('../models/passport');
const upload = require('../models/upload');
const app = express();
const router = express.Router(); // eslint-disable-line
const multipartMiddleware = multipart();
router.post('/xianyu/upload/idcard', multipartMiddleware, upload.uploadIdCard);
router.get('/xianyu/passport/login/taobao', passport.login.taobaoLogin);
router.get('/xianyu/passport/callback/taobao', passport.login.taobaoCallback);
app.use(router);
module.exports = app;