NodeJS 学习资料
NodeJS 学习资料汇总
Installation
Go to http://nodejs.org/, download node.js installer and follow instructions. Mac OS, Windows, and Linux are supported.
JavaScript
To use Node.js you need to have a decent understanding of JavaScript language.
- Codecademy - JS - Good for practicing and learning syntax.
- Crockford’s videos
- Eloquent JavaScript
- Essential JavaScript Design Patterns For Beginners
- Advanced JavaScript Fundamentals
- Understand JavaScript Closures With Ease
- JavaScript garden
- JavaScript Patterns Book
- JavaScript: The Good Parts Book
- JavaScript Promises
Development Tools/IDEs
- Yeoman - Project and modules generator
- Gulp - Task runner/build system
- Grunt - Task runner/build system
- WebStorm/PHPStorm - popular and extremely powerful IDE for coding web applications. Paid but you can get it for free , if you are an open-source developer (required an application approval).
- Node.js Tools for Visual Studio - see blog post from team member Scott Hanselman.
- NetBeans with Node.js plugin
- Nodejs Sublime Text 2 Package - a set of code completion, scripts and tools to work with Node.js.
- WebMatrix - is a free, lightweight, cloud-connected web development tool from Microsoft.
- CodeRunner - Mac only paid IDE.
- Komodo - full-featured IDE from ActiveState is paid but there is also lean free version Komodo Edit.
- Nide - is a web-based IDE for Node.JS that can run locally or on a remote server. Available both as a command-line tool and as a standalone Mac app.
- Nodeclipse & Enide - is free open-source IDE based on Eclipse.
- Aptana Studio
- Scripted
- Brackets
Online
- Cloud9 - cloud-based IDE with native support for development of Node.js applications including debugging and other features. Note that you can also install it locally.
- Nitrous.io - is both an IDE and environment in the cloud. Has both online and desktop versions. Paid.
- Koding - offers you a free bootable VM with Node. Also you can work on the same code with your friends.
- Cloud IDE (a.k.a eXo Cloud IDE, a.k.a cod envy) - cloud development IDE and environment with continuous integration and other features. Offers both hosted and on-premises solutions.
Hosting Providers
- Nodejitsu - hosting, databases and private NPM. Free for Open Source.
- OpenShift
- Heroku - Dead simple to use.
- Modulus -Scalable application platform (PaaS) for developers, offering Node.js hosting, MongoDB, and performance analytics in the cloud.
- Codio - Powerful web based IDE, free for public projects
Fundamentals
- Node.js FUNdamentals: A Concise Overview of The Main Concepts
- Why Node.js
- Migrating to Node.js
- Official Documentation
- CommonJS Module System
- Node.js Modules Official Documentation
- Managing module dependencies
- Using Node’s Event Module
- Understanding exports vs. module.exports
Asynchronous Programming
Promises
- ES6 Generators and Preventing Callback Hell
- Managing Node.js Callback Hell with Promises, Generators and Other Approaches
Node Package Manager (nam)
- What is nam?
- Introduction to npm
- Explore registered public nam modules
- How to publish your module to nam?
- Node.js tips and tricks
- Private NPM approaches
Debugging
- What’s New in Node.js v0.12: Debugging Clustered Apps with Node-Inspector
- Video: Debugging Node.js with node-inspector
- node-inspector
- Using Eclipse as Node Applications Debugger
Tutorials
- http://nodeschool.io/
- https://www.codeschool.com/courses/real-time-web-with-nodejs
- The dead-simple step-by-step guide for front-end developers to getting up and running with node.js, express, jade, and mongodb
- Make a RESTful todo app
- Authentication - Goes over local, Facebook & twitter authentication.
Command line
Blog posts/articles
- Node.js Production Practices - fantastic overview of design, deployment and debugging technics from Joyent.
Videos
- Introduction to Node.js with Ryan Dahl - Ryan Dahl is a Node.js creator. Must see.
- Alex Ford: Node.js & Express 101
- 142 conference presentation Videos from Lanyard.com
- Node.js video tutorials by Pedro Teixeira
- Collection of node.js video tutorials at vidinterest.com
- Node.js has Arrived! - In this video, Node.js core committer Bert Belder discusses some of the new features in Node v0.12 including Streams3, VM improvements, cluster round-robin, execSync and profiling APIs.
- Getting started with node.js at channel9.msdn.com -Basics of Express and Mongo -Getting Started with Sails.js -History of Node.js
Free Courses
Paid Courses
- Real-time Web with Node.js from codeschool.com
- Getting Started with Node.js and the NPM Package Manager from Treehouse.
- Node.js First Look(beginner) and Node.js Essential Training(advanced) at lynda.com
- Meet Node.js and Full-stack Node.js at peepcode.com
- Node.js courses at Pluralsight
Free Books
- The Node Beginner Book
- The Art of Node
- JavaScript and Node FUNdamentals
- Mixu’s Node book
- A collection of Node.js books
- Mastering Node.js
Paid Books
- Node.js in Action
- Learning Node.js: A Hands-On Guide to Building Web Applications in JavaScript Marc Wandschneide
- JavaScript on the Server Using Node.js and Express
- Express.js Guide
- Node js The Right Way
- Learn JS
Frameworks
- Sinatra like:
- connect - an extensible HTTP server framework for Node.js using “plugins” known as middleware.
- express.js - a Sinatra inspired Web development framework for Node.js.
- hapi - a rich framework for building Web applications and services.
- express.io = Express + Socket.io.
- koa - an expressive middleware for Node.js using generators.
- Flatiron - framework components for Node.js and a browser.
- total.js - a Web application framework for creating rich Web sites and Web services.
- MVC:
* [Geddy][129] - a simple, structured Web framework for Node.js.
* [Sails.js][130] - a realtime MVC Framework for Node.js.
* [Compound][131] - the compound formula is Express + Structure + Extensions.
- Full stack:
* [meteor.js][132] - Meteor is an ultra-simple environment for building modern Web applications. Built using Node.js, Meteor is a framework on its own. Please see an [amazing list of Meteor resources][133] for more information.
* [Derby][134] - the MVC framework making it easy to write realtime, collaborative applications that run in both Node.js and browsers.
* [SocketStream][135] - A fast, modular Node.js Web framework dedicated to building realtime single-page applications.
If you would like to learn more about Node.js frameworks, please visit nodeframework.com and nodewebmodules.com.
CLI TOOLS
CMS
Static Site Generators
- Hexo - fast, simple & powerful blog framework.
- Metalsmith - extremely simple, pluggable static site generator.
- Harp - static web server with built-in preprocessing.
- Assemble - static site generator for Grunt.js, Yeoman and Node.js.
- Wheat - a blog engine for coders written in node.JS.
- Punch - a fun and easy way to build modern websites.
- Blacksmith - generic static site generator built using flatiron, plates, and marked.
- Poet - a node.js blog engine.
See extensive collection of Static Site Generators including other languages at http://www.staticgen.com/
Libraries
- socket.io - a realtime application framework for Node.JS, with HTML5 WebSockets and cross-browser fallbacks support.
- mongoose - MongoDB object modeling designed to work in an asynchronous environment.
- winston - a multi-transport asynchronous logging library for Node.js
- passport - simple, unobtrusive authentication for Node.js.
- async - asynchronous utilities for Node and the browser.
- Q - a tool for making and composing asynchronous promises in JavaScript.
- co - the ultimate generator based flow-control goodness for nodes;
- jade - Jade - a robust, elegant, feature-rich template engine for Node.js.
- ejs - embedded JavaScript templates for Node.js.
- lodash - a utility library delivering consistency, customization, performance, and extras.
- request - a simplified HTTP request client.
- config - a runtime configuration for Node.js. modules.
- Passport - simple, unobtrusive authentication for Node.js that supports OpenID and OAuth.
Testing
Read about various approaches to testing Node.js code:
- Testing in Node.js
- Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
- Setting up Mocha and JSCoverage
- Acceptance testing with supertest
- Testing node.js applications with Jasmine
- Mocking Dependencies using [rewire]
Some popular testing frameworks:
- mocha - a simple, flexible JavaScript test framework for Node.js and a browser. (BDD, TDD, QUnit styles via interfaces).
- jasmin-node - integration of the Jasmine Spec framework with Node.js.
- sinon - test spies, stubs, and mocks for JavaScript.
- chai - a BDD / TDD assertion framework for Node.js and a browser.
- supertest - a super-agent driven library for testing Node.js HTTP servers using a fluent API.
- rewire - a dependency injection for Node.js applications.
- node-jscoverage - JSCoverage for Node.js.
What To Read
Communities/Groups
- Google Node.js Group
- Google+ Node.js Community
- CNode - Node.js professional Chinese community
- Node.js on Reddit
- Stackoverflow Node.js tag
- NodeJsForums.com
- IRC - For real-time chat about Node development go to irc.freenode.net in the #node.js channel with an IRC client or connect in your web browser to the channel using freenode’s WebChat.
Blogs/News
- “How To Node” blog
- Node.js Weekly - an email list that gathers up the latest events and news from around the Node.js community.
- NodeUp - a podcast covering the latest Node news in the community.
Who to Follow
- TJ Holowachuk - express, Jade, Mocha, Stylus
- Isaac Z. Schlueter - maintainer of Node.js / NPM
- Mikeal Rogers - Request
- James Haliday “substack” - Browserify, dnode, Optimist
- Guillermo Rauch - Socket.IO
Node mavens
You can find the most famous Node.js developer at Nodemavens.