Playing
07. Rebuilding assets and restarting Reverb

Transcript

00:00
So at this point, we've gone ahead and changed over our port and scheme.
00:03
Since we're using SSL, we've got this hooked up to the right host. The problem is all of our VConfig will be out of date. When we went ahead and deployed our application, we know that we run NPM run build to build all of our assets.
00:16
Another thing that you'll notice here is that when we toggled reverb within Forge, it will have added this artisan command to restart reverb. That means that between deploying any time, any of your config changes, this will reread this and of course, take the new configuration into effect.
00:34
So effectively, what we want to do is restart our server since we've changed over the port and scheme. And we also want to rebuild our assets. So on the client side, this reads in the new configuration
00:44
values from our JavaScript. So there's a couple of options. We can do this manually by issuing a command, or we can just redeploy our application.
00:53
I'm going to go ahead and do that now. Nothing's changed within the code, but this will rebuild our assets. And of course, restart our server. Let's wait for this to finish and then head over to our app.
01:03
Okay. Once that's finished, let's go and open our app backup, and we're going to bring up our console so we can check that everything is working nicely. Let's go ahead and give this a refresh.
01:13
And it looks like now we don't have any errors. And also over in our network tab, if we filter this by our web socket connections, you can see that we get a status of 101, which means this is connected successfully.
01:26
So moment of truth, we're just going to go ahead and hit broadcast a message. And as you can see, this is now pushing over to our reverb server. And of course, all of our connected clients are now picking up the events that are being pushed through.
7 episodes 16 mins

Overview

So you’ve built a realtime application. Now it’s time to deploy it.

Laravel Forge makes it incredibly easy to toggle Reverb, which configures your server for you and sets up (nearly) everything you need to broadcast and listen for events.

In this course, we’ll cover every step needed to get an local example application deployed to a production server, with a separate subdomain reserved for your Reverb connections.

Alex Garrett-Smith
Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Comments

No comments, yet. Be the first to leave a comment.