node-http-server – Rev 37

Subversion Repositories:
Rev:
// Main configuration file.
module.exports = {
    // Network related settings.
    net: {
        // The address or hostname that the HTTP server will be listening on.
        address: 'localhost',
        // The port that the HTTP server will be listening on.
        port: 8070,
    },
    log: {
        // The relative path to where to place the server log file.
        file: 'logs/server.log',
    },
    // Authentication settings.
    auth: {
        // The web locations that require authentication.
        locations: [
            '/admin/'
        ],
        // The authentication realm.
        realm: 'Wizardry and Steamworks',
        // The path to the password digset file containing users and passwords.
        digest: 'auth/htpasswd',
    },
    site: {
        // The document index that will be served when a directory is requested.
        index: 'index.html',
        // The web locations for which sending a directory index is allowed.
        indexing: [
            '/js/'
        ],
        // Any file matching these regular expressions will be offered.
        accept: [
            /^.+\.html$/,
            /^.+\.css$/,
            /^.+\.js$/,
            /^.+\.png$/,
            /^.+\.jpg$/,
            /^.+\.gif$/,
            /^.+\.ico$/,
            /^.+\.woff$/,
            /^.+\.woff2$/,
            /^.+\.map$/,
            /^.+\.ttf$/,
            /^.+\.svg$/,
            /^.*\.md$/,
            /^.*\.pdf$/,
            /^.*\.map$/
        ],
        // Any files matching these regular expressions will never be offered.
        reject: [
            /^\.bashrc$/
        ],
        // Cache expiry time in seconds for various files - a map of seconds
        // to cache to regular expressions matching a local filesystem path.
        cache: {
            3600: [
                /\.png$/,
                /\.jpg$/,
                /\.js$/,
                /\.css$/,
                /\.map$/
            ],
            60: [
                /\/js\/?$/
            ]
        },
        // URL re-writing.
        rewrite: {
            //'index.html' : /^\/((?!(bower_components|js|css|img|doc))|\/)(.+?)$/g
        },
        //  The name of the website.
        name: 'Wizardry and Steamworks',
    },
    ssl: {
        // Whether to enable HTTPs through SSL.
        enable: true,
        // The size of the key to generate for SSL.
        privateKeySize: 1024,
        // The address or hostname that the HTTPs server will be listening on.
        address: 'localhost',
        // The port that the HTTPs server will be listening on.
        port: 8080
    },
    configuration: {
        // Whether to enable sending the server configuration.
        enable: true,
        // The relative path that must be accessed to retrieve the configuration.
        path: '/configuration'
    }
}