How to connect to external databases (Heroku PG, Neon, etc)
i8ramin
PROOP

2 years ago

Hello, we are having some problems connecting to external databases from a Railway hosted express app. Everything seems to work fine locally, but once deployed to Railway, it just hangs. Is there any documentation on this anywhere? thank you

1 Replies

2 years ago

There wouldn't be any platform specific documentation on this because it wouldn't be platform specific in any way, the only documentation would be the documentation the database client you are using provides.

But a general guideline would be to make sure you are using environment variables set in the variables tab of the service and that you are using the same environment variables in code when initializing a database client, and of course handle all your errors properly.


Loading...