Vhosts

Unnode.js can easily be used to host multiple domains / websites on a single app instance.

You can also set a TLS certificate per-vhost. This uses SNI (Serve Name Indication) which is well supported by now.

Just configure your hostnames / domains in your unnode-server-config.js file:

module.exports = [
    {
        'vhost': ['my-site.org'],
        'routes': [
            { ... },
            { ... }
    },
    {
        // You can also use wildcards
        'vhost': ['another-site.org', '*.another-site.org'],
        'routes': [
            { ... },
            { ... }
    },
    {
        // This will catch all other requests not matched to the above hostnames
        'vhost': ['*'],
        'routes': [
            { method: 'GET', path: '/', controller: 'site-controller#not_found' }
        ]
    }
]

See configuration for full details on the server config file.

Next: Logging