码迷,mamicode.com
首页 > Web开发 > 详细

项目目录札记【附:config.json】

时间:2017-05-12 13:36:24      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:pre   添加   cto   dir   ops   ble   style   logs   文件   

config.json:基础配置文件

/* 该文件用于生产环境,不要轻易修改该文件,请修改development.json,修改相应的端口或配置*/
{
    /* begin 添加特殊的配置到里面,比如mongo*/
    // "mongoConfig": {
    //     "host": "mongoDb",
    //     "database": "xxx"
    // },
    /* end */

    "restify": "http://restSE:8080",
    "restifySec": "http://countSE:8080",
    "cacheDir": "path:./cache",
    "mongoConfig": {
        "host": "mongoDb",
        "database": "rbac" //修改
    },
    "log4jsConfig": "path:./config/log4js.json",
    "envYHCG":"finance",//银行存管
    "express": {
        "view engine": "ejs",
        "view cache": true,
        "views": "path:./site/views"
    },

    "qiniuConfig": {
        "ACCESS_KEY": "H51ZLbLGMEBOL0Ut56CI7ZOPsOiE3lkWdriXawr6",
        "SECRET_KEY": "Sf-Y_OzfCKtQCUgYZQ7AKTB0x8YsCkqb5ZYSXHIE",
        "bucketname": "epb-pc"
    },
    
    "view engines": {
        "ejs": {
            "module": "ejs",
            "renderer": "renderFile"
        }
    },

    "middleware": {
        "static": {
            "module": {
                "arguments": ["path:./public"]
            }
        },

        "favicon": {
            "module": {
                "arguments": ["path:./public/favicon.ico"]
            }
        },

        "logger": {
            "enabled": false
        },

        "log4js": {
            "enabled": true,
            "priority": 51,
            "module": {
                "name": "kraken-middleware/lib/log-mid",
                "arguments": [{
                    "category": "http",
                    "level": "auto"
                }]
            }
        },

        "cookieParser": {
            "module": {
                "arguments": ["6de5191ab3c401bcb266dff913"]
            }
        },

        "session": {
            "enabled": true,
            "priority": 100,
            "module": {
                "name": "kraken-middleware/lib/redis-session",
                "arguments": [{
                    "secret": "6de5191ab3c401bcb266dff913",
                    "cookie": {
                        "path": "/",
                        "httpOnly": true,
                        "maxAge": 1800000
                    },
                    "resave": true,
                    "rolling":true,
                    "saveUninitialized": true
                }, {
                    "host": "redisDb",
                    "port": 6379
                }]
            }
        },

        "appsec": {
            "enabled": true,
            "priority": 110,
            "module": {
                "name": "lusca",
                "arguments": [{
                    "csrf": true,
                    "xframe": "SAMEORIGIN",
                    "p3p": false,
                    "csp": false
                }]
            }
        },

        "switchOption": {
            "enabled": true,
            "priority": 119,
            "module": {
                "name": "kraken-middleware/lib/switch",
                "arguments": [{}]
            }
        },

        "router": {
            "enabled": true,
            "priority": 120,
            "module": {
                "arguments": [{
                    "directory": "path:./controllers"
                }]
            }
        },

        "fileNotFound": {
            "enabled": true,
            "priority": 130,
            "module": {
                "name": "kraken-js/middleware/404",
                "arguments": ["error/404"]
            }
        },

        "serverError": {
            "enabled": true,
            "priority": 140,
            "module": {
                "name": "kraken-js/middleware/500",
                "arguments": ["error/500"]
            }
        }
    }
}

 

项目目录札记【附:config.json】

标签:pre   添加   cto   dir   ops   ble   style   logs   文件   

原文地址:http://www.cnblogs.com/bala/p/6844912.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!