const express = require("express")
const user = require('./modules/user') // 用户模块
const article = require('./modules/article') // 文章
const comment = require('./modules/comment') // 评论

const app = express(); // 创建express应用
app.use(express.json());
app.use(express.static('public')) // 设置静态文件路径
// 使用路由模块
app.use('/api/user',user)
app.use('/api/article',article)
app.use('/api/comment',comment)

app.listen(3000); // 监听端口
console.log('server run success! http://localhost:3000')