Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Game Development with Phaser!
You have completed Game Development with Phaser!
Preview
Discover how to set up a local server to fix CORS issues that we have from our assets.
Set up a local development server
- Launch a local development server with the Live Server VS Code extension
- Use the http-server packege and run
npx http-server . -o -c-1in your terminal. Making sure you are in thebreakout_gameproject folder in your terminal.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
that we can prevent any
cross origin errors.
0:00
We're going to use a VS Code
extension called Live Server.
0:03
If you have it already,
you can skip the installation step.
0:07
If you don't have it, then you can
just follow what I'm going to do.
0:11
First, let's navigate to
the Extensions tab in VS Code.
0:14
You'll see there some extensions
with a search bar at the top.
0:18
Let's search for
Live Server and hit Enter.
0:21
Let's click on the first
option with a purple logo and
0:25
you'll see some options appear
on the right-hand side.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up