Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wunci committed Jul 17, 2017
1 parent 6bb2a71 commit d25861f
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Koa2-blog
node+koa2+mysql
node+koa2+mysql (欢迎star)

教程 [Node+Koa2+Mysql 搭建简易博客](http://www.wclimb.site/2017/07/12/Node-Koa2-Mysql-%E6%90%AD%E5%BB%BA%E7%AE%80%E6%98%93%E5%8D%9A%E5%AE%A2/)

### 创建数据库

登录数据库
```
mysql -u root -p
$ mysql -u root -p
```
创建数据库
```
create database nodesql;
$ create database nodesql;
```
使用创建的数据库
```
use nodesql;
$ use nodesql;
```


> database: nodesql tables: users posts comment (已经在lib/mysql建表)
| users   | posts   | comment |
Expand All @@ -43,13 +42,17 @@ use nodesql;
* postid:文章id

```
git clone https://github.com/wclimb/Koa2-blog.git
cd Koa2-blog
cnpm i supervisor
cnpm i
$ git clone https://github.com/wclimb/Koa2-blog.git
```
```
$ cd Koa2-blog
```
```
$ cnpm i supervisor
$ cnpm i
```
```
supervisor --harmony index
$ supervisor --harmony index
```
### 演示

Expand Down

0 comments on commit d25861f

Please sign in to comment.