Most Laravel tutorials define a Procfile
on the production step with the following contents:
web: vendor/bin/heroku-php-apache2 public/
But I'm wondering if there is a way to use the Laravel built in server instead? You would do this locally by calling php artisan serve
on the command line, but how would I configure the Procfile in this case?
I ask because I wasn't able to get Laravel to work properly without calling php artisan serve
on the command line. Although I've found incriminating info which states that this server isn't meant to be used for production (I'm really missing Rails' rails server
now).
I've tried the following:
web: vendor/bin/heroku-php-artisan-serve
And of course it doesn't work because there isn't an executable with that name in the bin folder. What is the correct way to go about doing this? Or is this a bad idea?
Simply:
web: php artisan serve --port=$PORT
But that is not a good idea, because it uses PHP's built-in development server, which handles just one request at a time.