2 * @file Node entry and main driver
3 * @author Jordan Lavatai, Ken Grimes
6 * @copyright loljk 2017
7 * @summ ary HTTP(S) Router that uses the first directory in the requested URL
10 const opts
= require('./opts.js')
11 const router
= require('./router.js')
13 Object
.keys(opts
['bindings']).forEach((key
) => {
14 router
.createBind(key
, opts
['bindings'].key
)
17 router
.startHttpServer({
19 skelFile
: './skel.html',
20 clientJS
: opts
['client-js'],
21 hostJS
: opts
['host-js'],
22 httpdRoot
: opts
['file-dir'],
24 certFile
: opts
['ca-cert'],
25 keyFile
: opts
['ca-key']