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: 5 comments 35 replies

Comment options

You must be logged in to vote
7 replies
@rafaelnogueira1
Comment options

@nickjuntilla
Comment options

@m3c-ode
Comment options

@amanbhatt26
Comment options

@sanalpanicker
Comment options

Answer selected by imjamesku
Comment options

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

Comment options

You must be logged in to vote
25 replies
@sanalpanicker
Comment options

@ajnart
Comment options

@Jxck
Comment options

@alextenczar
Comment options

@RaymondMwaura
Comment options

Comment options

You must be logged in to vote
2 replies
@SoolaimanG
Comment options

@ajnart
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet