Can you give a hint why is express handling one request at a time? I thought that it should be able to do multiple at once.
const express = require('express');
const app = express();
var count = 0;
app.get('/', (req, res) => {
count++;
if (count > 1) {
console.log('concurrent!');
debugger;
}
console.log(count);
count--;
res.send('Hello World!');
});
app.listen(1333, () => console.log('Example app listening on port 1333!'));
I'm never getting the case with the debugger no matter what. Tried to send multiple reqs with ab:
ab -n 100 -c 100 -m GET localhost:1333/
They are always waiting for each other...