You need to recover your application source code from Heroku.
Cloning the git repository
If you have deployed your application via our
git push heroku master method, or via Heroku Pipelines, you can download the latest revision from our git servers with:
heroku git:clone -a APP-NAME
This will clone the git repository to your machine with the latest code. Please note, this will only include branches that you have pushed to Heroku, which in most cases will only be the
Downloading the application slug
If you have not used git to deploy your application, or using
heroku git:clone has only created an empty repository, you can download the slug that was build when you application.
Determine the release version number you want the code/slug to be downloaded from. The CLI command
heroku releases -a <app_name>will show you all releases for your app.
heroku slugs -a <app_name>to find the slug ID for the particular version selected. You'll need to install the Heroku Slugs CLI Plugin first if you haven't already.
heroku slugs:download <slug_id> -a <app_name>.
This will download and compress your slug into a directory with the same name as your application.