-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
32 lines (29 loc) · 988 Bytes
/
index.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
const express = require('express')
const app = express()
const scheduleJob = require('./util/scheduleJob') // 定时爬虫
// 路由
const baiduNewsRouter = require('./router/baiduNews')
const bossDataRouter = require('./router/bossData')
const pneumoniaRouter = require('./router/pneumonia')
const hotSearchRouter = require('./router/hotSearch')
const otherRouter = require('./router/other')
const v2exRouter = require('./router/v2ex')
const taobaokeRouter = require('./router/taobaoke')
// 百度新闻
app.use('/baiduNews', baiduNewsRouter)
// boss直聘
app.use('/bossData', bossDataRouter)
// 丁香园疫情
app.use('/pneumonia', pneumoniaRouter)
// 微博热搜
app.use('/hotSearch', hotSearchRouter)
// 其他
app.use('/other', otherRouter)
// v2ex
app.use('/v2ex', v2exRouter)
// 淘宝客
app.use('/taobaoke', taobaokeRouter)
let server = app.listen(3000, function () {
const port = server.address().port
console.log('Your App is running at http://localhost:' + port)
})