A
A
Abr_ya2020-08-07 23:05:41
Node.js
Abr_ya, 2020-08-07 23:05:41

How to set up Node.js on Heroku?

There is a simple apollo-server. Works locally. In the sandbox we see something like:
5f2db32f301ce286683838.png

Deploy to Heroku using CLI goes smoothly, environment variables are specified, the sandbox opens. Only here the request ends with an error:

"error": "NetworkError when attempting to fetch resource."

5f2db3e6dae9f714440106.png

What debugging steps can be taken?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
t800zippygod, 2020-08-08
@t800zippygod

If you rummage a little in Basurman, watch the video https://youtu.be/ok6bu-3XRA8 . It is just about deploying an application on graphql and Apollo on Heroku.
And so, check, mb you specified the full path with the local host in the configuration of the Apollo client (such as localhost:5000/graphql ), but you just need ”/graphql”.
But look at the hair anyway

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question