const express = require('express');
const app = express();
const port = 3000;

// 中间件
app.use(express.json());

// 路由接入
const userRoutes = require('./routes/user');
const adminRoutes = require('./routes/admin');
app.use('/api', userRoutes);
app.use('/api', adminRoutes);

// 启动服务器
app.listen(port, () => {
  console.log(`服务器正在运行：http://localhost:${port}`); // TODO
});