修改获取总页数
This commit is contained in:
@@ -6,10 +6,12 @@ import tagsRouter from "./router/tags.js";
|
||||
import infoRouter from "./router/info.js";
|
||||
import searchRouter from "./router/search.js";
|
||||
import homeRouter from "./router/home.js";
|
||||
|
||||
import http from "http";
|
||||
|
||||
const app = express()
|
||||
|
||||
|
||||
|
||||
//解决跨域
|
||||
app.use((req, res, next) => {
|
||||
// 设置是否运行客户端设置 withCredentials
|
||||
@@ -32,7 +34,7 @@ app.use('/v1/api/info', infoRouter);
|
||||
app.use('/v1/api/search', searchRouter);
|
||||
app.use('/v1/api/home', homeRouter);
|
||||
|
||||
app.listen(config.port, () => {
|
||||
http.createServer(app).listen(config.port, "::",() => {
|
||||
console.log(`
|
||||
爬虫运行在下面网址:
|
||||
|
||||
@@ -42,5 +44,15 @@ app.listen(config.port, () => {
|
||||
`)
|
||||
})
|
||||
|
||||
// app.listen(config.port, () => {
|
||||
// console.log(`
|
||||
// 爬虫运行在下面网址:
|
||||
|
||||
// 1️⃣ 公网 IPV6: http://[${ipv6()}]:${config.port}
|
||||
// 2️⃣ 局域网 IPV4: http://${ipv4()}:${config.port}
|
||||
|
||||
// `)
|
||||
// })
|
||||
|
||||
|
||||
export default app
|
||||
Reference in New Issue
Block a user