Created
November 9, 2019 19:24
-
-
Save antonioribeiro/fddc8a7accf23ae013a13000c78fbfd8 to your computer and use it in GitHub Desktop.
Revisions
-
antonioribeiro created this gist
Nov 9, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ // in your .env file, split APP_URL to extract protocol and hostname APP_PROTOCOL=https APP_HOSTNAME=myapp.test APP_URL="${APP_PROTOCOL}://${APP_HOSTNAME}" // install dotenv npm install dotenv // load it in your webpack.mix.js require('dotenv').config() // configure the LiveReload plugin to use the protocol && hostname you have on your .env file new LiveReloadPlugin({ protocol: process.env.APP_PROTOCOL hostname: process.env.APP_HOST }), // Change your template to use app.url instead @if(app()->environment() === 'local') <script src="{{ config('app.url') }}:35729/livereload.js"></script> @endif