Skip to content

connect ECONNREFUSED 127.0.0.1:80 #13316

Answered by jamesmosier
imjamesku asked this question in Help
Discussion options

You must be logged in to vote

Next recommends you write your server code directly in getServerSideProps: https://nextjs.org/docs/basic-features/data-fetching#write-server-side-code-directly

Otherwise you'd have to put the fully qualified url in your axios.get(`https://my-domain.com/api/trends...`) because the server doesn't know what your domain is.

Replies: 2 suggested answers 5 replies

Comment options

You must be logged in to vote
4 replies
@imjamesku
Comment options

@Suroor-Ahmmad
Comment options

@rafaelnogueira1
Comment options

@nickjuntilla
Comment options

Answer selected by imjamesku
Comment options

You must be logged in to vote
1 reply
@Ekundee
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
7 participants