@salsita/koa-server

[![NPM version](https://img.shields.io/npm/v/@salsita/koa-server.svg)](https://www.npmjs.com/package/@salsita/koa-server) ![Downloads](https://img.shields.io/npm/dm/@salsita/koa-server.svg?style=flat) ![Licence](https://img.shields.io/npm/l/@salsita/koa-s

Usage no npm install needed!

<script type="module">
  import salsitaKoaServer from 'https://cdn.skypack.dev/@salsita/koa-server';
</script>

README

@salsita/koa-server

NPM version Downloads Licence Dependency Status devDependency Status

Function to create and configure koa server.

Expects optional parameters:

  • log - logging function
  • ssl - ssl configuration (value or promise resolving in ssl configuration - usually object with key and cert keys)
  • allowUnsecure - if server is allowed to serve content over HTTP connection instead of redirecting to HTTPS

See https://github.com/salsita/nodejs-training/blob/master/src/index.js repo for usage.