2015-08-20 08:34
浏览 41

Heroku - 我可以使用Laravel内置服务器(不是Apache)为Laravel 5应用程序定义Procfile吗?

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?

图片转代码服务由CSDN问答提供 功能建议

大多数Laravel教程在生产步骤中定义 Procfile ,其中包含以下内容:

  web:vendor / bin / heroku-php-apache2 public / 

但我想知道是否有 一种使用Laravel内置服务器的方法呢? 您可以通过在命令行上调用 php artisan serve 在本地执行此操作,但在这种情况下如何配置Procfile?

我问,因为如果不在命令行上调用 php artisan serve ,我就无法让Laravel正常工作。 虽然我发现有罪的信息表明这个服务器并不打算用于生产(我现在真的很想念Rails' rails server )。 < p>我尝试过以下方法:

  web:vendor / bin / heroku-php-artisan-serve 

当然它不起作用,因为bin文件夹中没有带有该名称的可执行文件。 这样做的正确方法是什么? 或者这是个坏主意?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题