Angularjs Learning: The carrying of GIT+NODEJS environment under Windows __JS

Source: Internet
Author: User
Tags git clone
Angularjs


Angularjs is designed to overcome the lack of HTML in building applications. HTML is a good declarative language for static text presentation, but it is weak to build a Web application. So I did some work (you can also think of it as a gimmick) to get the browser to do what I want. 

git



Distributed version control tools

  Nodejs



Node.js is a suite of JavaScript toolkits for writing high-performance Web servers, and a series of changes begin with HTTP being paramount in node. Node optimizes the creation of HTTP servers, so most of the examples and libraries that you see on the web are concentrated on the Internet (HTTP frameworks, template libraries, and so on).



Believe that learning angularjs people know angularjs Chinese community, the community that set of programs {Jsgen} is the author of the full use of JavaScript development, basic ANGULARJS+NODEJS+MONGODB. There is a detailed angularjs introductory tutorial, this article is based on the inside of the Angularjs tutorial environment, as the first example: Phonecat. Community Address: http://angularjs.cn/ steps download git:http://msysgit.github.io/download nodejs:http://www.nodejs.org/ The installation process, like a Windows program, is omitted. 

First Step



Get instance files from GitHub, open git Bash, enter code


git clone git://github.com/angular/angular-phonecat.git





After the download is complete in the file directory in the


C:\Users\liboy\ (Win7&win8, I use the Win8)
Second Step


After the download is completed, the directory location is still in the user directory, so to output the following code into the Angular-phonecat directory


CD Angular-phonecat





Then set the steps according to the tutorial:


Git checkout-f step-0





Start the server


Node Scripts/web-server.js





Something goes wrong in my case, that is, 8000 ports are accounted for. Don't worry, just follow the steps below: Find the C:\Users\liboy\angular-phonecat\scripts\web-server.js file (refer to the first step) to open the Web-server.js file and find the following code:






Line Nineth


var default_port = 8000;


Change the 8000 to another port, and I can change it to 3000.
Run again:


Node Scripts/web-server.js





Open http://localhost:3000/app/index.html






ok~!



There's no Web-server.js file, and now the new boot is NPM start.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.