UNPKG

fkc

Version:

FKC application service framework.

18 lines 527 B
'use strict'; module.exports = (obj)=>{ let go; const gos = (e)=>{go = e}; const main = require('./main'); if (obj.http) { gos(false); const http = require('http'); http.createServer(main(obj)).listen(obj.http,gos(true)); } if (obj.https) { gos(false); const ssl = require('../ssl'); const https = require('https'); https.createServer(ssl(obj.host),main(obj)).listen(obj.https,gos(true)); } if (go&&obj.defs) obj.defs(); }