When I added any port in my express app
app.listen(port, async () => {
//code
});
I will got error when i have more than one request to “express server”
Error: listen EADDRINUSE: address already in use :::port
if i remove that. it work well.
So i was make some test by added some log into app.listen
app.listen("4000", () => {
console.log(`Running at localhost:4000`);
console.log('Initializing nodes...');
});
I see when i call any API to express for fist request i will got
Running at localhost:4000
Initializing nodes...
for second request
Error: listen EADDRINUSE: address already in use :::port
Pls give me any ideas how can resolve this problem