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 AngularJS Basics (1.x) Getting Started with Angular Your First Angular Directive

Lanre TH
Lanre TH
1,037 Points

I am learning Angular JS but I want to work with my Windows PC and not Workspace, please how do I get http://port-80-y16

but I want to work with my Windows PC and not Workspace, please how do I get http://port-80-y16h96wvqy.treehouse-app.com/

2 Answers

Peter Tomasiewicz
Peter Tomasiewicz
5,592 Points

Hi there ! One of the easiest ways to set up a local server is to: Download Python 2.7 (the newest version Python 3 requires a slightly different set up so the following will not work with Python 3). After installing, open windows command prompt and depending on the location of your python main file, type: C:\Users\Peter Tom>cd.. (short for change direction) C:\Users>cd.. C:>cd Python27 (here you access the main Python file and now you can command Python to run a server for you by typing the following:

C:\Python27>python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ...

Then check ip addresses by typing ipconfig in the console and check your IPv4 Address. To this address add port 8000.

The last thing to do is to place your work files somewhere within your main Python folder and you'll be able to access them via browser on port 8000.

Now the server will be 'serving' data dynamically so you can test Angular, AJAX, etc

Hope that helps :)

If you want to make changes locally I recommend you just load your scripts to the index.html If you don't know any other server side languages and know some javascript which is most likely, then i recommend looking over the express course using node.

Node+Express is a good go to, to learn how to run with the server, Peter solution is simple but in the long run maybe difficult to fix any bugs without properly learning python whole angular is built on JS it goes hand in hand.