该例子是参照https://github.com/nswbmw/N-blog/blob/master/book/4.13%20%E6%97%A5%E5%BF%97.md 进行编写的,代码都来自上述地址 主要实现的功能:用户注册、登陆、退出、我的主页、发表文章、文章详情页、留言、删除留言node
运行程序以前: npm install 安装所须要的包git
运行mongodb数据库: 启动mongodb PS F:\mongodb\bin> ./mongod.exe --dbpath "F:\mongodb\data\db" 打开浏览器:http://localhost:27017/ It looks like you are trying to access MongoDB over HTTP on the native driver port.github
运行本程序: PS F:\myblog> node index.js 打开浏览器:http://localhost:3000/posts 查看效果mongodb
运行 supervisor index 启动博客,访问如下地址查看效果:数据库
http://localhost:3000/posts http://localhost:3000/signout http://localhost:3000/signupnpm
github地址:https://github.com/baolei0108/myblog浏览器
本人小白一枚,喜欢的朋友请给个小星星,谢谢post