2

I have a repo with 2 folders - 1 for the server, 1 for the client, and each folder has its own package.json file.

I am trying to deploy the server to Heroku, but I get a "No default language could be detected for this app" error because the package.json is not in the root folder of the repo.

I created a new repo with just the server files inside it to test, and I am able to deploy to Heroku like this. But I do not want to do this, I'd like to keep the repo as is with the 2 separate folders.

Is there any way to do this without creating a new repo for the server?

jfc
  • 361
  • 3
  • 15

1 Answers1

0

You can simly create a docker-compose file that will spin up your client and server. Then after that, in heroku you need to choose the Docker in the deployment page.

More information about using docker and node: https://blog.logrocket.com/node-js-docker-improve-dx/

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – tjheslin1 May 05 '22 at 09:54