a year ago
I need to deploy my backend service and get it connected to postgres but I can't. Where do I find more information regard this topic?
13 Replies
a year ago
I deployed a REST API built in NestJs, it supposed to be connected to a PostgreSQL database. The build and deployment phases are successful, but from the nestjs perspective, I'm not able to access the service using the railway URL and Service is not able to stablish the connection to the database. PostgreSQL says "Database does not exists".
a year ago
I'm not sure what are all the required environment variables, it might be the problem.
a year ago
Where do I find information about these environment variables?
a year ago
This is the list, Am I missing something?DB_HOST
DB_PORT
HOST
PASSWORD
PORT
USER_NAME
a year ago
These are not all environment variables for a database.
I would recommend using DATABASE_URL
a year ago
Yeah, but what if I don't need this URL to run my service in local environment? Does railway uses this URL in order to work properly?
a year ago
Do you have a NestJS Stater kit that I could check?
a year ago
I'm using TypeOrm, just the connection string parameters are mandatory.
Attachments
a year ago
I saw the problem, there was a mismatch between the name of the environment variables name provided from railway, and the environment variables that my service is using.