1.0.0 • Published 8 years ago

auk-listen v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

auk-listen

Handles http and https via config

import Koa from 'koa';
import config from 'auk-config';
import errors from 'auk-errors';
import logger from 'auk-logger';
import listen from 'auk-listen';

const app = new Koa();
config(`${__dirname}/config`, { packageConfig })(app);
logger(app);

app.use(errors);

listen(`${__dirname}/../cert/`)(app).then((server) => {
    console.log('Listening !');
});

config:

  • socketPath OR port (+ hostname)
  • tls: boolean

If tls is true, the files server.key and server.crt will be loaded from the