Next.js failing to query another local server in getInitialProps

Viewed 370

I'm trying to query a rails server running locally through getInitialProps, however I keep getting an error Error: connect ECONNREFUSED 127.0.0.1:3000 at TCPConnectWrap.afterConnect I know there's nothing wrong with the rails server as I can query it just fine through Postman and another non-next react application. Is there some extra config you need to pass to next.config.js to query another locally running server?

0 Answers
Related