-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,76 +29,69 @@ mysql >= 5.3 | |
|
||
## 安装 | ||
|
||
### 1. Git方式下载文件 | ||
|
||
```bash | ||
# 也可以直接到github或gitee上下载压缩文件 | ||
git clone https://github.com/yafoo/melog.git | ||
cd melog | ||
npm i | ||
``` | ||
|
||
## 运行 | ||
|
||
### 1. 修改配置 | ||
# 运行程序,系统默认运行在3003端口 | ||
node server.js | ||
``` | ||
|
||
修改`/config/app.js`文件,关闭调试模式。如遇运行失败,请打开调试模式,查看错误提示。 | ||
### 2. 访问系统安装页,填写数据库连接信息,点击安装 | ||
|
||
```javascript | ||
app_debug: false, | ||
``` | ||
http://127.0.0.1:3003/install | ||
``` | ||
|
||
> 提示:如果网址打开出错,或者安装失败,可以修改 `/config/app.js` 文件,将 `app_debug` 设置为 `true`,打开调试模式,并重启程序,然后在控制台可以看到更多错误信息。 | ||
修改`/config/db.js`文件,配置数据库 | ||
## 访问首页 | ||
|
||
``` | ||
type : 'mysql', // 数据库类型 | ||
host : '127.0.0.1', // 服务器地址 | ||
database : 'melog', // 数据库名 | ||
user : 'root', // 数据库用户名 | ||
password : '', // 数据库密码 | ||
port : '3306', // 数据库连接端口 | ||
charset : 'utf8', // 数据库编码默认采用utf8 | ||
prefix : 'melog_' // 数据库表前缀 | ||
http://127.0.0.1:3003 | ||
``` | ||
|
||
### 2. 导入数据 | ||
|
||
将根目录下`melog.sql`文件导入数据库。 | ||
## 访问后台 | ||
|
||
> V2版本升级V3,请运行`v2_to_v3.sql`数据库升级文件。 | ||
- 后台地址:`http://127.0.0.1:3003/admin` | ||
- 默认账号:`[email protected]` | ||
- 默认密码:`123456` | ||
|
||
### 3. 运行程序 | ||
## 旧版升级 | ||
|
||
```bash | ||
node server.js | ||
``` | ||
### 1. V2版本升级 | ||
|
||
## 访问首页 | ||
v2版本升级v3,请手工运行 `v2_to_v3.sql` 数据库升级文件。然后创建文件 `/config/install.js`,内容如下: | ||
|
||
``` | ||
http://127.0.0.1:3003 | ||
```javascript | ||
module.exports = { | ||
install: true | ||
}; | ||
``` | ||
|
||
## 访问后台 | ||
### 2. V3.0版本升级 | ||
|
||
后台地址:`http://127.0.0.1:3003/admin` | ||
默认账号:`[email protected]` | ||
默认密码:`123456` | ||
系统从v3.1版开始支持系统安装。v3.0版升级后,也需手工创建 `/config/install.js` 文件,内容同v2升级。 | ||
|
||
## 其他 | ||
|
||
### 开发者博客 | ||
[https://me.i-i.me/](https://me.i-i.me/ "https://me.i-i.me/") | ||
#### 开发者博客 | ||
- [https://me.i-i.me/](https://me.i-i.me/ "https://me.i-i.me/") | ||
|
||
### jj.js MVC框架 | ||
Github: [https://github.com/yafoo/jj.js](https://github.com/yafoo/jj.js "https://github.com/yafoo/jj.js") | ||
#### jj.js MVC框架 | ||
- Github: [https://github.com/yafoo/jj.js](https://github.com/yafoo/jj.js "https://github.com/yafoo/jj.js") | ||
- Gitee: [https://gitee.com/yafu/jj.js](https://gitee.com/yafu/jj.js "https://gitee.com/yafu/jj.js") | ||
|
||
Gitee: [https://gitee.com/yafu/jj.js](https://gitee.com/yafu/jj.js "https://gitee.com/yafu/jj.js") | ||
#### 爱主页网址导航 | ||
- [https://www.i-i.me/](https://www.i-i.me/ "https://www.i-i.me/") | ||
|
||
### 爱主页网址导航 | ||
[https://www.i-i.me/](https://www.i-i.me/ "https://www.i-i.me/") | ||
## Nginx代理设置 | ||
|
||
### Nginx代理设置 | ||
|
||
``` | ||
```nginx | ||
location / { | ||
proxy_pass http://127.0.0.1:3003; | ||
proxy_http_version 1.1; | ||
|