You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apolo Pena edited this page May 3, 2021
·
4 revisions
See your changes in realtime
Hot reloading allows you to see the results of your code changes in the browser automatically. A special server is used to periodically scan your project and refresh the browser when it sees any changes.
On the Gitpod platform, implementing hot reloading for dynamically served pages such as PHP can be a headache. Projects built with gitpod-laravel-starter come with a cli tool called hot-reload that makes things easy to set up and control hot reloading.
hot-reload
The hot-reload cli tool comes with its own help system, simply run hot-reload --help to learn more.
The quickest way to get started is run this one-liner:
hot-reload setup && hot-reload start
A preview browser will open on port 3005, this is a webpack server that proxies requests to and from your development server.
Now to test it, just change some content in resources/views.welcome.blade.php or wherever and your changes will show up automatically in the preview browser.
Once you push all the new files to your repository, hot reload will not need to be setup again. You should still use the other hot-reload commands to start, stop, and refresh the hot reload server as needed.