xiaoguo1987 / iBlog

基于 Node.js 的开源个人博客系统。

Home Page:https://skysun.name

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iBlog

基于 Node.js 的开源个人博客系统,现代化的 UI 和用户体验。采用响应式布局,支持移动端访问。
不仅仅是博客,更是 Demo,是适合新人入门学习的完整项目。

界面预览

  • 博客首页 首页
  • 后台管理 后台
  • 移动端 移动端

在线实例

我的博客 https://skysun.name/

分支说明

技术构成

快速开始

  1. 准备条件

安装 Node.js (v8 以上版本)、MongoDB
推荐安装 Yarn 而非 npm 以进行包管理。

  1. 安装依赖
$ yarn
  1. 启动站点
  • 开发模式
$ yarn run dev
  • 生产模式

先编译项目

$ yarn run build

再启动站点

$ yarn start

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

Enjoy it! 😄

系统设置

根据实际情况修改 /blog.config.ts 配置文件,修改后需要重启服务器才能生效。
参数说明:

host

String 类型,主机名,配置为 0.0.0.0 表示监听任意主机。

port

Number 类型,端口号。

enableHTTPS

Boolean 类型,是否启用 HTTPS。

mongoUrl

String 类型,MongoDB 链接。

jwtSecret

String 类型,JWT 秘钥。

线上部署

使用PM2

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

安装

$ yarn global add pm2

启动

$ pm2 start pm2.json

使用noginx

noginx 是基于 Node.js 的 HTTP 及反向代理服务器(类似 nginx),如果你有多台 iBlog 服务器实例,你可以使用 noginx 进行代理转发和负载均衡。

许可协议

MIT License

Copyright (c) 2020 Sky.Sun 孙正华

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

基于 Node.js 的开源个人博客系统。

https://skysun.name

License:MIT License


Languages

Language:Vue 68.9%Language:TypeScript 28.7%Language:CSS 2.4%Language:JavaScript 0.1%