修改爬虫
This commit is contained in:
27
newBackApi/app.js
Normal file
27
newBackApi/app.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import express from "express";
|
||||
import config from "./config/config.js";
|
||||
import { ipv6, ipv4 } from "./utils/ip.js";
|
||||
|
||||
import tagsRouter from "./router/tags.js";
|
||||
import infoRouter from "./router/info.js";
|
||||
import searchRouter from "./router/search.js";
|
||||
|
||||
|
||||
const app = express()
|
||||
|
||||
app.use('/api/v1/tag', tagsRouter);
|
||||
app.use('/api/v1/info', infoRouter);
|
||||
app.use('/api/v1/search', searchRouter);
|
||||
|
||||
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