@@ -3,37 +3,37 @@ let path = require('path');
33let rootdir = path . resolve ( __dirname , '../../' ) ; // 工程根路径
44const project = '/koa2' ;
55const conf = {
6- project : project ,
7- port : 3000 ,
8- rootdir : rootdir ,
9- debug : false , // true-开发模式 false-生产环境
10- env : process . env . NODE_ENV || 'develpoment' ,
11- dist : 'dist' , // webpack打包输出路径
12- defaultPage : 'index.html' ,
13- allowedFileExtension : [ '.js' , '.css' , '.html' , '.ttf' , '.woff' ] , // 定义允许下载的文件类型
14- log4js : {
15- level : 'debug' ,
16- output : path . join ( rootdir , 'logs/app.log' )
17- } ,
18- webservice : {
19- url : 'http://localhost:8001' ,
20- ver : '/web' ,
21- connectTimeout : false ,
22- requestTimeout : false
23- } ,
24- session : {
25- key : 'sid' ,
26- store : undefined , // Session第三方存储
27- maxAge : 3600 * 1000 , // 60mins
28- httpOnly : true ,
29- path : project
30- } ,
31- redis : { // 通常一个项目只需配置一台redis服务器即可
32- host : '127.0.0.1' ,
33- port : 6379 ,
34- db : 15
35- } ,
36- store : null // 定义将项目中的常量存储于何处。null:NodeJS内存(默认) redis:Redis服务器
6+ project : project ,
7+ port : 3000 ,
8+ rootdir : rootdir ,
9+ debug : false , // true-开发模式 false-生产环境
10+ env : process . env . NODE_ENV || 'develpoment' ,
11+ dist : 'dist' , // webpack打包输出路径
12+ defaultPage : 'index.html' ,
13+ allowedFileExtension : [ '.js' , '.css' , '.html' , '.ttf' , '.woff' ] , // 定义允许下载的文件类型
14+ log4js : {
15+ level : 'debug' ,
16+ output : path . join ( rootdir , 'logs/app.log' )
17+ } ,
18+ webservice : {
19+ url : 'http://localhost:8001' ,
20+ ver : '/web' ,
21+ connectTimeout : false ,
22+ requestTimeout : false
23+ } ,
24+ session : {
25+ key : 'sid' ,
26+ store : undefined , // Session第三方存储
27+ maxAge : 3600 * 1000 , // 60mins
28+ httpOnly : true ,
29+ path : project
30+ } ,
31+ redis : { // 通常一个项目只需配置一台redis服务器即可
32+ host : '127.0.0.1' ,
33+ port : 6379 ,
34+ db : 15
35+ } ,
36+ store : null // 定义将项目中的常量存储于何处。null:NodeJS内存(默认) redis:Redis服务器
3737} ;
3838
3939module . exports = conf ;
0 commit comments