File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ Lin-CMS 是林间有风团队经过大量项目实践所提炼出的一套**内
3535
3636### 当前最新版本
3737
38- lin-mizar(核心库) :0.1.0-beta.1
38+ lin-mizar(核心库) :0.1.0-beta.4
3939
40- lin-cms-koa(当前实例工程 ):0.1.0-beta.1
40+ lin-cms-koa(当前示例工程 ):0.1.0-beta.3
4141
4242### 文档地址
4343
@@ -49,9 +49,9 @@ lin-cms-koa(当前实例工程):0.1.0-beta.1
4949
5050### QQ 交流群
5151
52- QQ 群号:699501172
52+ QQ 群号:643205479
5353
54- <img class =" QR-img " width =" 258 " height =" 300 " src =" http://imglf4 .nosdn0.126.net/img/Qk5LWkJVWkF3NmlPcDV2NjJvR2dFYU90R0ZuS2g1STZVa1NhOWN2YVhrUnFXdmJVRk5LQ1FnPT0 .jpg?imageView&thumbnail=500x0 &quality=96&stripmeta=0&type=jpg " >
54+ <img class =" QR-img " width =" 258 " height =" 300 " src =" http://imglf3 .nosdn0.126.net/img/Qk5LWkJVWkF3Nmdyc2xGcUtScEJLOVV1clErY1dJa0FsQ3E1aDZQWlZHZ2dCbSt4WXA1V3dRPT0 .jpg?imageView&thumbnail=1680x0 &quality=96&stripmeta=0&type=jpg " >
5555
5656### 微信公众号
5757
Original file line number Diff line number Diff line change 22
33module . exports = {
44 db : {
5- database : 'lin-cms5 ' ,
5+ database : 'lin-cms ' ,
66 host : 'localhost' ,
77 dialect : 'mysql' ,
88 port : 3306 ,
Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ let siteDomain ;
4+ switch ( process . env . NODE_ENV ) {
5+ case 'development' :
6+ siteDomain = 'http://localhost:5000/' ;
7+ break ;
8+ case 'production' :
9+ siteDomain = '' ;
10+ break ;
11+ }
312module . exports = {
413 port : 5000 ,
5- siteDomain : 'http://localhost:5000' ,
14+ siteDomain,
615 countDefault : 10 ,
716 pageDefault : 0 ,
817 apiDir : 'app/api' ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ class LocalUploader extends Uploader {
2626 arr . push ( {
2727 key : file . fieldname ,
2828 id : exist . id ,
29+ path : `${ exist . path } ` ,
2930 url : `${ siteDomain } /assets/${ exist . path } `
3031 } ) ;
3132 } else {
@@ -49,6 +50,7 @@ class LocalUploader extends Uploader {
4950 arr . push ( {
5051 key : file . fieldname ,
5152 id : saved . id ,
53+ path : `${ saved . path } ` ,
5254 url : `${ siteDomain } /assets/${ saved . path } `
5355 } ) ;
5456 }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44 "description" : " simple and practical CMS implememted by koa" ,
55 "main" : " app/starter.js" ,
66 "scripts" : {
7- "start:dev" : " nodemon" ,
8- "start:prod" : " node app/starter.js" ,
7+ "start:dev" : " cross-env NODE_ENV=development nodemon" ,
8+ "start:prod" : " cross-env NODE_ENV=production node app/starter.js" ,
99 "prettier" : " prettier --write app/**/*.js app/*.js app/**/**/*.js app/**/**/**/*.js tests/**/*.js && eslint app tests --fix"
1010 },
1111 "keywords" : [
2323 "@types/koa__cors" : " ^2.2.3" ,
2424 "@types/prettier" : " 1.16.1" ,
2525 "@types/supertest" : " ^2.0.7" ,
26+ "cross-env" : " ^5.2.0" ,
2627 "eslint" : " ^5.15.1" ,
2728 "eslint-config-standard" : " ^12.0.0" ,
2829 "eslint-plugin-import" : " ^2.16.0" ,
4243 "koa-bodyparser" : " ^4.2.1" ,
4344 "koa-mount" : " ^4.0.0" ,
4445 "koa-static" : " ^5.0.0" ,
45- "lin-mizar" : " ^0.1.0-beta.4 "
46+ "lin-mizar" : " ^0.1.0-beta.5 "
4647 }
4748}
You can’t perform that action at this time.
0 commit comments