efficiently / larasset

Larasset is a library for Laravel 4, 5.0, 5.1, 5.2 and 5.3 which manage assets in an easy way
http://laravel.io/forum/07-18-2014-package-larasset-asset-pipeline-the-ultimate-front-end-tool
MIT License
67 stars 5 forks source link

How do I run the assets server in production?(not a bug) #19

Closed cmosh closed 8 years ago

cmosh commented 8 years ago

(not a bug) It may seem obvious to most but I have placed all my assets in the pipline and run ' php artisan larasset:precompile --assets-env production ' In order to serve these assets I then used the php artisan larasset:serve command because I saw no other way, now if I close the cmd ny assets are not served. { I am new to asset pipelines }

tortuetorche commented 8 years ago

Hi @cmosh,

In production, Larasset precompiles these files to public/assets by default. The precompiled copies are then served as static assets by the web server. The files in app/assets are never served directly in production. From the The Asset Pipeline Guide

So the precompiled files generated by Larasset are placed in the public/assets directory of your Laravel application. Then your Web server (Apache HTTP, NGINX...) must serve them as static files. I'm sure you can find, in your favorite search engine, how to accomplish this :wink:

For advance configuration, between your static files and your Web server, you can also read this section of the Asset Pipeline guide.

Cheers, Tortue Torche

cmosh commented 8 years ago

Thanks again.