screen sharinggit add .!
[henge/kiak.git] / router.js
1 /**
2 * @file HTTP(S) Router that treats the first directory in a URL's path as
3 * a route to a host.
4 * @author Ken Grimes
5 * @version 0.0.1
6 * @license AGPL-3.0
7 * @copyright jk software 2017
8 */
9 const fs = require('fs')
10
11 module.exports = (opts) => {
12 const startHttpd = (listener) => {
13 if (opts['no-tls'])
14 return require('http').createServer(listener)
15 if (fs.existsSync(opts['ca-cert']))
16
17 }
18 return {
19 httpd: startHttpd(),
20 wsd: startWsd()
21 }
22 }