Skip to content

liuyuu11/myblog

Repository files navigation

node-blog-jade

在线实例

个人博客 http://www.91snoob.com/

分支说明

当前项目分为 master 分支和 Jade-template 分支,唯一的区别在于 master 分支使用的是我自己写的 Saker 模板引擎,Jade-template 分支使用的 Jade 模板引擎。

功能模块

博客

  • 文章列表页
  • 文章详细页

留言

关于

后台管理

  • 网站统计
  • 博客管理 - 新的文章
  • 博客管理 - 分类管理
  • 博客管理 - 文章管理
  • 评论管理
  • 留言管理
  • 关于管理
  • 缓存管理
  • 异常管理
  • 系统设置

技术构成

快速开始

准备条件

安装最新版Node.jsbowerMongoDBRedis(可选)。
(注:如果使用Windows平台,可以去https://github.com/MSOpenTech/redis/releases下载安装Redis)

安装依赖

  • 服务端依赖
$ npm install
  • 客户端依赖
$ bower install

参数配置

根据实际情况修改 config.json 配置文件,DbPath 是 MongoDB 路径,Redis 是缓存配置,Redis.Active 表示是否启用Redis缓存(默认不开启),Redis.Host 表示 Redis 服务器 ip 地址,Redis.Port 表示 Redis 端口号。

{
  "DbPath": "mongodb://localhost/myblog",
  "Redis": {
      "Active": false,
      "Host": "127.0.0.1",
      "Port": 6379
  }
}

后台管理员账号信息在 config/account.json 中配置,默认管理员账号 admin ,密码 123456 ,密码需md5加密存储。

{
  "Id": "1",
  "UserName": "admin",
  "Password": "e10adc3949ba59abbe56e057f20f883e"
}

在 "后台管理-系统设置" 页面中,支持以可视化方式配置其余参数。

启动站点

*注意:暂不支持node v4及以下版本

  • 方式1:普通模式启动
$ node ./bin/www 
  • 方式2:快速启动
$ npm start

打开浏览器,访问 http://localhost:3000/

Enjoy it! 😄

线上部署

推荐使用 pm2 进行线上Node.js的进程管理和持久运行。

安装

$ npm install -g pm2

使用

$ pm2 start ./bin/www

许可协议

The MIT License (MIT)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published