Whats the point of running Laravel with the command 'php artisan serve'?

前端 未结 4 1037
广开言路
广开言路 2020-12-14 16:23

I dont seem to understand why we need to run a Laravel app with php artisan serve vs just running it with Apache or nginx. I k

4条回答
  •  被撕碎了的回忆
    2020-12-14 16:40

    The serve command is just a shortcut for the PHP Built-in Webserver, something PHP has out of the box, so the point of using it is to start testing your application as fast as you could, you just need to install PHP, Composer and your application is up (if you don't need anything else, of course). But if you already have Nginx installed, there is no point at all, just use it.

    It's not wise to use the Builtin Webserver in production.

提交回复
热议问题