export function start(db, log, core, http, port) { const server = http.createServer(function (req, res) { res.writeHead(200); res.end(JSON.stringify({ version: 'exampleindex' })) }) return new Promise(function(res, rej) { server.listen(port || 4000, '0.0.0.0', function(err) { if (err) { return rej(err) } log.event.info(`Server is listening on ${port} serving package ${staticPackage}`) log.info(`Server is listening on ${port} serving package ${staticPackage}`) res() }) }) }