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 trialRanjen Naidu
2,474 Pointshow to setup the html file in localhost
Hi ,
can you guide me how to create the index.html file in my localhost? how to make the index and javascript file connected in my web browser via http://localhost ?
For example :
When i search localhost/index.html in the browser it should display from index.html file in my computer.
6 Answers
Joseph Moreau
1,387 PointsHi Ranjen!
Probably! If you follow that video, you don't really want to use localhost yet. First, install notepad++ in your Windows 7, then create a webpage index.html, after create another for myscript.js. After all, run it in your browser as Chrome, then Press ( Ctrl+ Shift+ J), and you will see the code and a header click on console you will see your JavaScript you already create.
If you still need the localhost you can download WAMPSERVER for Windows and XAMPP for OS.
Nkosi Ndlovu
9,652 PointsProbably the easiest way is with xampp. What OS you on?
Ranjen Naidu
2,474 PointsWindows 7, okay i will try installing that, thanks :-)
fabio vella
3,548 PointsI don't think you need to setup a local host for such simple exercise
Chhavy Mahoney
2,649 PointsI have windows 8, I write my index.html and myscript.js on the notepad and I save them in one folder on the desktop. Then right click on the index.html file that you have saved. It is asked open with. You choose Google Chrome.
Peter Van der Lely
6,342 PointsHi there,
All in all you write and save your webfiles with the help of an editor like notepad or TextPad or Brackets (free download from brackets.io) or tons of others. When you save this like index.html in a directory on your C: drive with the name of localtreehouse, you open the index.html file with the help of your Chrome browser and it's 'URL' will show as: file:///C:/locolhosttreehouse/index.html. Now by opening the developer tools of your Chrome browser will bring you in sync with the video.
Regards Peter