Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MajedAbdullah's avatar

Does database credentials have to be same?

Hello. I’m new at deploying projects on live server. I have frontend and backend. I’m trying to deploy on heroku server. But I have some confusion. Is there any way to deploy frontend and backend simultaneously? If so, then how? I deployed the backend. But I’m so confuse here. Does the heroku database credentials has to be the same for backend also? Such as name, username, password, port, host, db url and so on. Because frontend and backend access the same database. In the local server I can’t run both in the same port. Does it behave same in the real server? Thanks

0 likes
3 replies
Sinnbeck's avatar

Is your frontend and backend not the same code base? If not, how do they differ?

MajedAbdullah's avatar

I have two .env files for BE and FE. Both are accessing the same database.

jlrdw's avatar

What is front end env, how used. FE is users browser.

Please or to participate in this conversation.