四好公路
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
巴林闲侠 6f4dcd76d0 授权管理 3 years ago
..
test 授权管理 3 years ago
README.md 授权管理 3 years ago
config.js 授权管理 3 years ago
index.js 授权管理 3 years ago
package.json 授权管理 3 years ago

README.md

An empty web server.

default config

'use strict';
/*jslint node:true*/
const path = require('path');
const os = require('os');
const dev = process.env.DEBUG || true;
const product = {
    port: 80,
    mws: [],
    dc: {
        url: "postgres://postgres:postgres@10.8.30.21:5432/postgres",
        opts: {
            pool: {
                max: 20,
                min: 10,
                idle: 10000
            }
        },
        models: []
    },
    logger: {
        level: 'debug',
        json: false,
        filename: path.join(__dirname, 'log', 'runtime.txt'),
        colorize: true,
        maxsize: 1024 * 1024 * 5,
        rotationFormat: false,
        zippedArchive: true,
        maxFiles: 10,
        prettyPrint: true,
        label: '',
        timestamp: true,
        eol: os.EOL,
        tailable: true,
        depth: null,
        showLevel: true,
        maxRetries: 1
    }
};

const development = {
    port: 4000,
    mws: [],
    dc: {
        url: "sqlite://sqlite:sqlite@localhost:5432/sqlite",
        opts: {
            storage: path.join(__dirname, 'test', 'test.db'),
            define: {
                "timestamps": false, "freezeTableName": true
            }
        },
        models: []
    },
    logger: product.logger
};
development.logger.filename = path.join(__dirname, 'log', 'development.txt');

module.exports = dev ? development : product;