Deploy Static HTML with Heroku
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.
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.
Step 2) Inside the composer.json file add empty curly braces.
Step 3) Create a php file, 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.
Step 6) Create a heroku app
Step 7) Push the app to heroku
git push heroku master
Step 8) To see your open your page
— — — — — — — — — — — Happy Deployment — — — — — — — — — — — —