After deploying successfully my nodejs app to AWS elastic beanstalk, I could open it on postman and check my routes, although it was all working correctly, from ebs logs, I could see a javascript error: Environment variable not found: DATABASE_URL.
so it seems that my app on AWS doesn't have a DATABASE_URL environment to load on my Prisma/schema.prisma file.
on the other hand, I discovered that AWS does provide database connection details through proccess.env
as follows here: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-nodejs.rds.html#nodejs-rds-create
but I have no clue how can I connect to my database on AWS when it's in production but with my .env DATABASE_URL when it's in development.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/cVEMHn7
Comments
Post a Comment