Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Run JavaScript in browser with own text editor(Sublime Text 3)

Hi, I am over the max amount of workspace and i now need to know how to run the code in the browser. I am using Sublime Text 3. I fgured out how to run the html and css in the browser. However, my problem:

  • I do not know i can make the Javascript parts run too. Only the html is working in the browser. There is no interactivity. I read about needing to setup a local host, but i cannot figure out how to do so. And i cannot find any clear instructions anywhere. So now i am stuck with the tutorials since i cannot move ahead.

I am sure this is not that diffucult to do since a web developer does this all the time.. Is there a simple tutorial for this? Any help is greatly appreciated.

Thanks

2 Answers

Steven Parker
Steven Parker
215,939 Points

Are you sure you need to keep all 100 of those workspaces? Typically, you can delete all the ones that are part of courses you have already completed. Then you will have plenty room for your current course.

Just go directly to the Workspaces page and click the trash can on the right of each one you no longer need. Note that you'll have several pages if you have 100 active ones.

Oh, i did not even realise that! Thanks! I'll be able to keep up the momentum. But still, i need to be able to run it from my own text editor eventually. If you have any links to how to do this or other resources expailing it i would be very greatful.

Steven Parker
Steven Parker
215,939 Points

If your editor allows live HTML preview in your browser, it probably is capable of serving the JS to the browser as well. It's probably just a matter of proper configuration, you might look in the editor's documentation.

Steven Parker
Steven Parker
215,939 Points

Abbas Zaidi — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!