var path = require('path');
var serviceDir = path.join(__dirname, '..');
var maxAge = 24 * 60 * 60 * 1000;
exports = module.exports = function () {
    return {
        server: {
            host: '0.0.0.0',
            port: 3000,
            env: 'development',
            dir: path.join(serviceDir, 'public'),
            engine: 'ejs',
            publicPath: '/',
            staticServerPath: path.join(serviceDir, 'public'),
            cluster: false,
            ssl: {
                enabled: false,
                options: {}
            },
            staticServer: {
                maxAge: maxAge
            }
        },
        logger: {
            console: true
        },
        output: {

        },
        cookieParser: 'igloo-change-me',
        session: {
            secret: 'igloo-change-me',
            key: 'igloo',
            cookie: {
                path: '/',
                httpOnly: true,
                secure: false,
                sameSite: 'strict',
                maxAge: maxAge
            },
            resave: true,
            saveUninitialized: true
        },
        notApiRouteRegexp: /^(?!\/__webpack_hmr\/)|(?!\/*.ico).*$/,
        redis: {
            prefix: 'igloo-development',
            host: '127.0.0.1',
            port: 6379,
            pass: ''
        },
        proxy: {
            target: 'http://47.110.158.110:20000',
            apiRouteRegexp: '/api',
            ignoreRouters: ['/api/uaa/v1/auth/tokens'],
            authUrl: '/uaa/v1/auth/tokens',
            refreshUrl: '/uaa/v1/auth/tokens',
            signOutUrl: '/signOut',
            signInUrl: '/#login',
        }
    };
};

exports['@singleton'] = true;