Deploy a simple HTML/CSS/Javascript Application On Heroku
So for deploying an app to heroku we always need Buildpacks which are offically supported by Heroku.
But incase if we want to upload a minimal project which only uses HTML/ CSS/Javascript then a situation might occur that the required buildpack is not available .
Here are the steps to deploy your own app to heroku :-
- Open heroku website and make an account . “https://id.heroku.com/login”
2. Create a new app . “https://dashboard.heroku.com/new-app” . Give an app name according to your own desire .
3. Open the Comand Prompt. Type the following command :-
$ heroku login
4. Change the directory in the cmd to the one where the files of your project are present
5. After changing the directory write the following commands in cmd
$ git init
$ heroku git:remote -a name-of-your-app
6. Following commands are also mentioned in the deploy section on heroku website documnetation .

$ git add .
$ git commit -am "make it better"
$ git push heroku master
7. If after this an error is generated stating that :-
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘https://git.heroku.com/name-of-your-app.git'
then we need to create some new files in our project folder
- Create a new file and save it as composer.json
- Create another file and save it as index.php
8. Write the following code in the index.php file
<?php include(“index.html”); ?>
Leave the composer.json file empty as it is .
9. After creating these two files , run the following commands on the cmd
$ git add .
$ git commit -am "make it better"
$ git push heroku master
10. After this surely your app will be deployed on heroku :)