'Localhost refused to connect in Visual Studio code

Im working on a node.js file and when I run the API I get a ERR_CONNECTION_REFUSED error on chrome.The Error Page



Solution 1:[1]

Make sure your server is up and running and also check if the port is correctly configured.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Shahryar_Jahanshahloo