How to create your first heroku application?
Heroku is a SaaS based Cloud solution which supports multiple programming languages with DevOps architecture.
It is highly designed for simplifying the Application deployment process, starting from Development till Production deployment.
Before starting, you need to signup for an account in heroku & download the command line version to your system. Please find the below links for download:
After installation of the command-line version, you will be able to see something similar to below:
Then, You need to go to https://signup.heroku.com/login and signup for a free account. After verifying your email, you will be able to log into heroku.
After creation of the account, you need to go to your command-line and write the below command to log into heroku from command-line.
Now you have been logged into the heroku account successfully with your username and password. Once logged in, you can create an application using the below command:
heroku create appname
Now the app has been created successfully. Now we need to define the build language for the application. (For this instance i am going to use php). For building a language, you must have to initialize the git in your local. Follow the below commands to do so.
heroku git:remote -a appname
heroku buildpacks:set heroku/php
Now you need to create a file with .php extension with your php codes. For me i am using the below script with a name index.php
echo "Hello ibnus";
After creating the php file, you need to run the below git commands to push it.
git add .
git commit -am "initial commit"
git push heroku master
Now your all the codes has been uploaded successfully and you can access the url using: appname.herokuapp.com