Nodejs Fix Error connect ECONNREFUSED ::1:80 while using localhost

node v18.11.0
version: 1.0.0
endpointsharetweet
const axios = require("axios") try { await axios.get('http://localhost') } catch (error) { console.log(error.message) }
const { setDefaultResultOrder } = require("dns"); setDefaultResultOrder("ipv4first"); try { await axios.get('http://localhost') } catch (error) { console.log(Date.now(), error.message) }
Loading…

no comments

    sign in to comment