javascript - Hapi js and Postman Chrome App - subsequent requests -
i have minimal hapi server:
const hapi = require('hapi'); const server = new hapi.server(); server.connection({ port: 8080 }); server.route({ method: 'get', path: '/hello', handler: function(request, reply) { console.log('hooray'); settimeout(function() { console.log('mellow'); return reply("hello"); }, 7500);//7.5 seconds } }); server.start((err) => { console.log(`server started @ ${ server.info.uri }`); });
now if send 2 request 2 seconds delay using postman chrome app (from 2 different tabs), output on console:
server started @ http://clivend-n56vv:8080 hooray mellow hooray mellow
why hapi waiting reply first request before processing other?
thanks!
it's not hapi waiting prevoius request. bet testing in 1 browser. try make 2 request 2 different browsers or curl.
Comments
Post a Comment