import express from "express";
import cors from "cors";
import config from "./src/config.js";
import adminRouter from "./src/router/admin.js";
import response from "./src/middleware/response.js";

const app = express();

app.use(express.json()); // 处理body中json数据的中间件
app.use(cors()); // 处理跨域的中间件
app.use(response()); // 处理响应的中间件

app.use("/admin",adminRouter);


app.listen(config.PORT);




