Deploy Static HTML with Heroku

Nirvik Basnet
2 min readApr 24, 2020

Have you ever tried to deploy your webpage made with simple html and css with heroku and got this error ?

!     No default language could be detected for this app.

Heroku is simple cloud platform that we can use to deploy our apps. Its mostly free and it makes it very easy to share our ideas without paying a dime.

Heroku supports JavaScript, PHP , Ruby ,Clojure , scala and Python.

In this example we will try to deploy a static HTML page, for this we need to follow the steps below:

Step 1) Create a composer.json file.

touch composer.json

Step 2) Inside the composer.json file add empty curly braces.

{}

Step 3) Create a php file, index.php

touch index.php

Step 4) Inside the php file add the following line of code.

<?php include_once("index.html"); ?>

Step 5) Initialise a git repo in the project directory , add all your file and commit.

git initgit add .git commit -m "first commit"

Step 6) Now do heroku login. After you put the following command a browser window will pop up and you need to fill in your credential.

heroku login

Step 6) Create a heroku app

heroku create

Step 7) Push the app to heroku

git push heroku master

Step 8) To see your open your page

heroku open

— — — — — — — — — — — Happy Deployment — — — — — — — — — — — —

https://www.youtube.com/watch?v=RgBKLPTRUx0

--

--