How to set up postgraphile on a digitalocean hosted postgres db

Posted August 29, 2021 66 views
PostgreSQLDigitalOcean Managed PostgreSQL DatabaseGraphQL

I am trying to setup postgraphile on an already existing DigitalOcean hosted postgres db by following the instructions here
“npx postgraphile -c ‘postgres://’ –watch –enhance-graphiql –dynamic-json” but it fails on the very first trial with a connection time out error reproduced below.
PostGraphile v4.12.3 server listening on port 5000 :rocket:

‣ GraphQL API: http://localhost:5000/graphql
‣ GraphiQL GUI/IDE: http://localhost:5000/graphiql
‣ Postgres connection: postgres://doadmin:[SECRET] (watching)
‣ Postgres schema(s): public
‣ Documentation:
‣ Node.js version: v14.17.0 on linux x64
‣ Join Simon Elliott in supporting PostGraphile development:

A serious error occurred when building the initial schema. Exiting because retryOnInitFail is not set. Error details:

Error: connect ETIMEDOUT
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)

it seems like a permission issue of the server not allowing connections from the location.

How can I resolve this?

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!