auk-listen
v1.0.0
Published
Listen function, using config and logger for auk server
Downloads
6
Readme
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
ORport
(+hostname
)tls
: boolean
If tls
is true, the files server.key
and server.crt
will be loaded from the