Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJose Luis Ocaña
3,746 PointsDownloading and Running the Project Files
Because of how the Phaser.JS library handles files, you need to be running a web server locally to view a working copy of this project. You can't just open the index.html file in your web browser as you might a basic HTML page. There are several simple ways to get a web server up and running on your computer: I dont see the instruction how to run in Google web server?
6 Answers
Neil McPartlin
14,662 PointsHi Jose Luis. I'll assume the following...
- You have already downloaded and unzipped the project files from Treehouse.
- You have Chrome running.
- You have followed the blue link provided (Web Server for Chrome) just after the text you copied/pasted above.
- You clicked 'Add to Chrome' -> 'Add App' in order to add the extension to your Chrome browser.
- You are now redirected to chrome://apps/
So now...
- Click on (200 OK!) Web Server. The 'Web Server for Chrome' app opens.
- Using 'Choose Folder', pick the exact folder within which one will find the relevant index.html file. (By default, it will say 'Web Server : Started').
- Finally, just click on the URL offered beneath 'Web Server URLs'. Mine happens to be http://127.0.0.1:8887 but yours might be different. A new tab will open in Chrome and your program should be running.
Jose Luis Ocaña
3,746 PointsThanks it works great help!
Best
Jose
Jose Luis Ocaña
3,746 PointsHello Neil thanks again for your information. Do you have a good information of how to install a good web server apache to create my own web site and server at home. The complete info including how to setup a router plus ubuntu web server to practice my techdegree a live? Thanks Again?
Neil McPartlin
14,662 PointsHi Jose. Wow. That's some shopping list you have there :)
Personally, I wouldn't rush into a dedicated home server too quickly as you will probably need to commandeer an old(er) computer, start by installing Ubuntu as you say, then spend some frustrating hours/days searching for the necessary drivers etc., just to get that up and running.
Take a look at this... https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop#0
As for Apache, it's been around over 20 years and still going I see though their site does look a bit dated. To be fair, these organisations don't charge for their products and services. Here is an article I just Googled from 2 years ago...
...it gives you a flavour of how complex this can get.
Here is a video by Alena Holligan at Treehouse where she outlines what you would need to do to install MAMP (My Apache, MySQL and Php) on a Windows machine.
https://teamtreehouse.com/library/setup-your-local-development-environment
But how are you getting on with using Web Server for Chrome on your own computer? Did you know that you can configure it so that other computers, smartphones and tablets on your home LAN can see it too?
Jose Luis Ocaña
3,746 PointsGreat Thanks very good information. The google server is very good thanks to you. When I study always think foward and in the future planning to have a internet business at home. I need to learn a lot but I can do it. Thanks for all your information are very good to keep going.
Best Jose
Neil McPartlin
14,662 PointsWhen I study always think foward and in the future planning to have a internet business at home. I need to learn a lot but I can do it.
Excellent. Great attitude. :)
All I would add is that for local testing, setting up a server on your own local machine in order to be able to test your evolving dev code 'live' would be the most efficient solution. When it comes to going live with your business, it would be best to investigate the countless hosting companies who will charge an appropriate monthly fee but let them take the strain when it comes to...
- 24/7 uptime
- Guaranteed sufficient Internet bandwidth
- Responsibility for ensuring all the latest security patches are added to your 'server' hosted by them.
I wish you every success with your future business.
Jose Luis Ocaña
3,746 PointsThanks Neil excelent.
Rogério Rodrigues
121 PointsHi Jose!
I think that at some point following the Full JavaScript stack you will need also to install Node.js on Ubuntu 16.04:
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04
A nice way to go through the LAMP and Node.js stack is by setting up a Virtual Machine with virtualbox. This will avoid the need of an "old(er) computer"
https://www.turnkeylinux.org/lampstack or https://www.turnkeylinux.org/nodejs
Jose Luis Ocaña
3,746 PointsExcellent thanks
Sheila Anguiano
Full Stack JavaScript Techdegree Graduate 35,239 PointsSheila Anguiano
Full Stack JavaScript Techdegree Graduate 35,239 PointsThanks Neil, I was having the same problem...do you know if along the way Treehouse explains why we need a webserver in this course? and the game cannot load locally from the files in our computer?
Neil McPartlin
14,662 PointsNeil McPartlin
14,662 PointsHi Sheila. In the case of this specific course, Jose copy/pasted into his question, the teachers notes where it states.
It is a statement of fact but it does not try to explain in more detail why this is so.
I have done some of the Full Stack courses on Treehouse and often, they simply start by saying you need to start a 'local server' and suggest some of the ways one can do that, just as they did with this course.
Treehouse teachers often quote the MDN site when providing external references so here is just one link which helps to answer your question.
https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server
The specific point of interest is...
I have been 'playing around with code' for awhile, so previously I would have installed a server called Apache which was quite common. Currently, having studied a bit of node.js and therefore used NPM, I have used packages found in NPM such as 'http-server'. The best local server for you can depend on specifically what code you need to host and on which OS you are developing.