DEV Community 👩‍💻👨‍💻

Rohit Urane
Rohit Urane

Posted on

Host your laravel application on Heroku for free.

Image description

Host your testing laravel application on Heroku for free.

Do you want to #host your laravel application on Heroku? You are going with a new setup of the laravel application.

Creating Laravel application on Local System

First, I am installing the laravel application on the local development system through composer.

composer create-project --prefer-dist laravel/laravel herokuApp
Enter fullscreen mode Exit fullscreen mode

Make Procfile inside the root folder of your project

After completing the installation, create a file of the name Procfile and insert the below code. This file is a configuration file for Heroku.

web: vendor/bin/heroku-php-apache2 public/
Enter fullscreen mode Exit fullscreen mode

Download and login to the Heroku platform from the command line

For that, you need to install Heroku CLI on your system. Go to the Heroku platform and download & install it. Click Here. Run the below command inside your project folder.

heroku login
Enter fullscreen mode Exit fullscreen mode

It will open a browser window to log in to Heroku. If you don't have an account on Heroku, create it first.

Read More

Top comments (0)

🌚 Life is too short to browse without dark mode