npm init -y
npm install express body-parser bootstrap connect-flash connect-mongo debug ejs express-session mongoose multer -S
- 用户注册
- 用户登录
- 用户退出
- 创建分类
- 分类列表
- 删除分类
- 创建文章
- 修改文章
- 删除文章
- 查询文章
- 评论文章
## 实现路由
/user/signup 注册
/user/signin 登录
/user/signout 退出
/category/list 分类列表
/category/add 增加分类
/category/delete/:id 删除分类
/article/add 增加文章
/article/delete/:id 删除文章
字段名称 | 字段名 | 字段类型 |
---|---|---|
用户名 | username | 字符串 |
密码 | password | 字符串 |
邮箱 | 字符串 | |
头像 | avatar | 字符串 |
字段名称 | 字段名 | 字段类型 |
---|---|---|
分类名称 | name | 字符串 |
字段名称 | 字段名 | 字段类型 |
---|---|---|
文章标题 | title | 字符串 |
文章内容 | content | 字符串 |
作者 | author | ID类型 |
发表时间 | createAt | 日期 |