-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.js
47 lines (33 loc) · 1.4 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const Koa = require('koa');
const route = require('koa-route');
const controller = require('./src/controller/index')
const app = new Koa();
// 教务相关
app.use(route.get('/login', controller.login));
app.use(route.get('/scorelist', controller.scorelist));
app.use(route.get('/event', controller.event))
app.use(route.get('/classlist', controller.classlist))
app.use(route.get('/schedule', controller.schedule))
app.use(route.get('/exam_arrange', controller.exam_arrange))
app.use(route.get('/semesterinfo', controller.semesterinfo))
app.use(route.get('/selfinfo', controller.selfinfo))
app.use(route.get('/program', controller.program))
app.use(route.get('/lesson_survey', controller.lesson_survey))
app.use(route.get('/course_select', controller.course_select))
app.use(route.get('/vpn_ticket', controller.vpn_ticket))
app.use(route.get('/course_search', controller.course_search))
// 图书馆相关
app.use(route.get('/book_search', controller.book_search))
app.use(route.get('/book_status', controller.book_status))
app.use(route.get('/book_info', controller.book_info))
app.use(route.get('/book_ranking', controller.book_ranking))
app.on('error', (err, ctx) =>
console.error('server error', err)
);
const port = 3002
app.listen(process.env.PORT || port, () => console.log(`listening at ${port} ...`))
// 一些基础信息
const basicInfo = {
currentWebSemesterId : '114'
}
module.exports.basicInfo = basicInfo