Directory
- Learning materials
- Brief introduction
- Install node. js
- About NPM
- Development tools
- Sublime node. JS Development Environment Configuration
- Extension: Installing multi-version Manager
Learning materials
1. node. js Http://www.infoq.com/cn/minibooks/nodejs
2.node.js Development Guide
Introduction (Just pick up what I think is important)
node. JS is a platform that lets JavaScript out of the browser running on the server, not the language;
The JavaScript engine used by node. JS is a V8 from Google Chrome; JavaScript compatibility issues that run outside the browser without having to worry about headaches
The use of single-threaded, asynchronous IO and event-driven design to achieve high concurrency (asynchronous events also to some extent increased the difficulty of development and debugging);
node. JS has an HTTP server built in, so it's good news for web development;
Home: http://nodejs.org/
English api:http://nodejs.org/api/(latest)
Chinese api:http://nodeapi.ucdok.com/#/api/
Install node. js
Operating system Environment: WiN 7 64-bit
Relatively simple installation in a Windows environment
http://nodejs.org/download/
Link to download the corresponding operating system installation files (install the latest version on the line)
Follow the prompts, until the installation succeeds, you can see (C:\Program files\nodejs) under the default installation path, and the default path can be modified at the time of installation.
After successful installation, in command prompt input: Node-v View the installation version, the output version is installed successfully
About NPM
Node pageaged Modules https://npmjs.org/(NPM) is included in Windows node. JS installation package installation. This node. JS itself has a basic module, which NPM can install a rich node. JS Library to complete the actual development requirements.
Common Command Description:
View Help
NPM Help or NPM H
Mounting module
NPM Intstall <module name>
Install the module in the Global Environment (-G: Enable global mode)
NPM install-g <module name>
MORE: https://npmjs.org/doc/install.html
Uninstalling the module
NPM Uninstall <moudle name>
Displays the modules installed in the current directory
NPM List
After successful installation, NPM and node. JS paths are added separately in the path user environment variable and system environment
Development tools
Webstorm I downloaded a 7.0, as if with a lot of it
webstorm:http://www.jetbrains.com/webstorm/
Do. NET development can choose WebMatrix3, download direct installation, operation is very convenient, do not do too much explanation, with a period of time, you can directly build Nodejs project, if only in the Windows environment Development, recommend it
webmatrix:http://www.microsoft.com/web/webmatrix/
I finally chose the sublime, can be in each platform to maintain a unified development tools, configuration method online there are many
sublime:http://www.sublimetext.com/(software does not need to register, the use of the process will pop up the need to register the window, cancel it)
Sublime node. JS Development Environment Configuration
if the node. JS compilation error is as follows:
Note that the following environment configuration is not good: follow the configuration below;
Download and install the node. JS installation package Before you start the configuration
1. Install Sublime Text 2 first
2. Run sublime, find tools---> Build system---> New build system on the menu
3. Copy the file into the
{ "cmd": ["Node", "$file"], "File_regex": "^[]*file \" (... *) \ ", line ([0-9]*)", "selector": "Source.javascript"}
4. Save the file as Nodejs.sublime-build
5. On the menu, locate tools---> Build System---> select NodeJs
6. Install the package control, run the sublime, press the shortcut key ctrl + '; Enter the following in the console and return;
Import Urllib2,os,hashlib; h = ' 7183a2d3e96f11eeadd761d777e62404 ' + ' e330c659d4bb41d3bdf022e94cab3cd0 '; PF = ' package control.sublime-package '; IPP = Sublime.installed_packages_path (); Os.makedirs (IPP) if not os.path.exists (IPP) else None; Urllib2.install_opener (Urllib2.build_opener (urllib2. Proxyhandler ())); by = Urllib2.urlopen (' http://sublime.wbond.net/' + pf.replace (', '%20 ')). read (); DH = hashlib.sha256 (by). Hexdigest (); Open (Os.path.join (IPP, PF), ' WB '). Write (by) if DH = = h else None; Print (' Error validating download (got%s instead of%s), please try manual install '% (DH, h) if DH! = H Else ' please rest Art Sublime Text to finish installation ')
For more information, please refer to: https://sublime.wbond.net/installation#st2
7. After the installation is complete, restart the sublime, press the shortcut key CTRL + Shift + P; Enter install, select Install package and enter
8. Enter NodeJs and select NodeJs installation (can be loaded with JavaScript & NodeJs Snippets)
9. Create a new Test.js file and enter Console.log (' Hello node. js '); Press the shortcut key CTRL + B to run, successfully output! Such as
Configuring the Sublime node. JS development environment Here is a success!
If you want a better look at the theme color scheme please refer to: http://www.dbpoo.com/sublime-text2-theme-sod/
Extension: Installing multi-version Manager
Install the multi-version manager NVMW (Node Development guide in the book used in the Nvm,windows as if not, in the www.npmjs.org to find this, although the study can not use, first put it on again)
Installation commands
NPM install-g NVMW
Because there is no use to it, all do not do a long introduction, Detailed View
Https://npmjs.org/package/nvmw
Nodejs Study notes (i)---profile and install the node. JS Development environment