Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to set up postgraphile on a digitalocean hosted postgres db
I am trying to setup postgraphile on an already existing DigitalOcean hosted postgres db by following the instructions here https://www.graphile.org/postgraphile/quick-start-guide/
“npx postgraphile -c ‘postgres://user:secret-0.b.db.ondigitalocean.com:25060/defaultdb?sslmode=require?ssl=true&sslrootcert=ca-certificate.crt’ –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]@user.b.db.ondigitalocean.com:25060/defaultdb (watching)
‣ Postgres schema(s): public
‣ Documentation: https://graphile.org/postgraphile/introduction/
‣ Node.js version: v14.17.0 on linux x64
‣ Join Simon Elliott in supporting PostGraphile development: https://graphile.org/sponsor/
A serious error occurred when building the initial schema. Exiting because retryOnInitFail is not set. Error details:
Error: connect ETIMEDOUT 220.127.116.11:25060
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?