Skip to content

Commit

Permalink
docs 更新部署文档
Browse files Browse the repository at this point in the history
  • Loading branch information
tumobi authored Sep 23, 2017
1 parent 7861720 commit 7619096
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,32 @@ CREATE SCHEMA `nideshop` DEFAULT CHARACTER SET utf8mb4 ;
```
> 注意数据库字符编码为utf8mb4
+ 更改数据库配置
src/common/config/db.js
```
export default {
type: 'mysql',
adapter: {
mysql: {
host: '127.0.0.1',
port: '3306',
database: 'nideshop',
user: 'root',
password: 'root',
prefix: 'nideshop_',
encoding: 'utf8'
},
mongo: {
}
}
};
src/common/config/adapter.js

```
/**
* model adapter config
* @type {Object}
*/
exports.model = {
type: 'mysql',
common: {
logConnect: isDev,
logSql: isDev,
logger: msg => think.logger.info(msg)
},
mysql: {
handle: mysql,
database: 'nideshop',
prefix: 'nideshop_',
encoding: 'utf8mb4',
host: '127.0.0.1',
port: '3306',
user: 'root',
password: 'root',
dateStrings: true
}
};
```

Expand All @@ -51,7 +58,7 @@ npm start

### 线上部署

+ 没有域名部署参考文档:[通过新浪云部署NideShop微信小程序商城(基于Node.js+MySQL+ThinkJS)](http://www.jianshu.com/p/78a0f5f424e1)
+ 没有域名部署参考文档:[不用买域名、不用备案、不用配置https快速部署Node.js微信小程序商城(基于Node.js+MySQL+ThinkJS)](http://www.jianshu.com/p/ecd0c85e8376)

+ 如有域名且已备案,可参考:[阿里云Ubuntu 16.04 下部署Node.js+MySQL微信小程序商城](http://www.jianshu.com/p/38d13a7c1b78)

Expand Down

0 comments on commit 7619096

Please sign in to comment.