首页 > TAG信息列表 > EvaluationSystem
EvaluationSystem:中间件和共享模块
1、共享模块(shared) 【第一】数据库连接(shared/sequelize.js) // 数据库 const {Sequelize} = require('sequelize'); module.exports = new Sequelize({ dialect: 'mysql', host: 'localhost', port: 3306, username: 'root',EvaluationSystem:路由设置
1、首页路由(routes/home.js) 首页路由: 首页(/) // 首页模块 routes/home.js const Router = require('koa-router'); const router = new Router(); const dataService = require('../services/data'); router.get('/', async (ctx) => { let {pag