Jonatan Nilsson
df7e1e5509
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
17 lines
No EOL
540 B
JavaScript
17 lines
No EOL
540 B
JavaScript
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()
|
|
})
|
|
})
|
|
} |