const gracefulStopServer = function () { // Wait 10 secs for existing connection to close and then exit. server.stop({timeout: 10 * 1000}, () => { logger.info('Shutting down server') process.exit(0) }) }
t.equal(response.body, common.handshakes['ok'].query['hub.challenge'], 'should receive provided challenge back'); server.stop(function()
server.stop(); });
stop(){ server.stop(); }
t.equal(response.statusCode, 200, 'should return code 200'); server.stop(function()
const server = new Hapi.Server({address: 'localhost', port: 0}); configureRoutes(server).then(() => server.start()).then(() => onListen(server.info.port)); return ({close: () => server.stop()}); const server = new Hapi.Server({address: 'localhost', port: 0, tls}); configureRoutes(server).then(() => server.start()).then(() => onListen(server.info.port)); return ({close: () => server.stop()});
t.equal(response.body, common.handshakes['bad'].error, 'should received error message'); server.stop(function()
const server = new Hapi.Server({address: 'localhost', port: 0}); configureRoutes(server).then(() => server.start()).then(() => onListen(server.info.port)); return ({close: () => server.stop()}); const server = new Hapi.Server({address: 'localhost', port: 0, tls}); configureRoutes(server).then(() => server.start()).then(() => onListen(server.info.port)); return ({close: () => server.stop()});