需求分析
项目设计
b/s架构
后端 nodejs express框架
前端 js/css/html jquery bootstarp
项目建立
express blog --view ejs
连接数据库
mongoose
业务模型(M)
mongoose.Scheam
mongoose.molde('模型名称',Scheam对象)
控制器(C)
find 查询所有 数组
findOne 查询一条 对象
where 增加条件
skip limit 分页
count 查询数量
sort 排序
populate 模型关联
req 请求对象
res 响应对象
next 调用下一个中间件
路由
get post
页面(V)
public 静态页面
layer 提示信息
wangEditor 编辑器
bootstrap-switch 开关
ejs 模板
<%=输出内容%>
<%-输出html%>
<%逻辑判断%>
multer 文件上传
trim-html 字符串切割
base64
全局数据
res.local 整个请求
app.local 正个应用
登录认证
session 数据储存
session-flash session闪存
md5 加密
自定义中间件
middleware 全局数据 登录认证
ajax数据
jquery post get
项目部署
项目设计
b/s架构
后端 nodejs express框架
前端 js/css/html jquery bootstarp
项目建立
express blog --view ejs
连接数据库
mongoose
业务模型(M)
mongoose.Scheam
mongoose.molde('模型名称',Scheam对象)
控制器(C)
find 查询所有 数组
findOne 查询一条 对象
where 增加条件
skip limit 分页
count 查询数量
sort 排序
populate 模型关联
req 请求对象
res 响应对象
next 调用下一个中间件
路由
get post
页面(V)
public 静态页面
layer 提示信息
wangEditor 编辑器
bootstrap-switch 开关
ejs 模板
<%=输出内容%>
<%-输出html%>
<%逻辑判断%>
multer 文件上传
trim-html 字符串切割
base64
全局数据
res.local 整个请求
app.local 正个应用
登录认证
session 数据储存
session-flash session闪存
md5 加密
自定义中间件
middleware 全局数据 登录认证
ajax数据
jquery post get
项目部署