我如何开始使用Node.js ?

时间:2021-05-19 07:31:07

Are there any good resources to get started with Node.JS? Any good tutorials, blogs or books?

有什么好的资源可以开始使用Node.JS吗?有好的教程、博客或书籍吗?

Of course, I have visited its official website http://nodejs.org/, but I didn't think the documentation they have is a good starting point.

当然,我访问了它的官方网站http://nodejs.org/,但是我不认为他们的文档是一个好的起点。

3 个解决方案

#1


4321  

Tutorials

教程

Developer Sites

开发网站

Videos

视频

Screencasts

截屏

Books

Courses

课程

Blogs

博客

Podcasts

播客

JavaScript resources

JavaScript资源

Node.js Modules

节点。js模块

Other

其他

#2


1699  

First, learn the core concepts of Node.js:

首先,学习Node.js的核心概念:

Then, you're going to want to see what the community has to offer:

然后,你会想看看社区提供了什么:

The gold standard for Node.js package management is NPM.

节点的黄金标准。js包管理是NPM。

Finally, you're going to want to know what some of the more popular packages are for various tasks:

最后,你会想知道一些比较流行的包是用来做各种各样的任务的:

Useful Tools for Every Project:

每个项目有用的工具:

  • Underscore contains just about every core utility method you want.
  • 下划线包含您想要的所有核心实用程序方法。
  • Lo-Dash is a clone of Underscore that aims to be faster, more customizable, and has quite a few functions that underscore doesn't have. Certain versions of it can be used as drop-in replacements of underscore.
  • Lo-Dash是下划线的一个克隆,它的目标是更快、更可定制,并且有很多下划线的功能。它的某些版本可以用作下划线替换。
  • TypeScript makes JavaScript considerably more bearable, while also keeping you out of trouble!
  • 打字稿使JavaScript更容易忍受,同时也让你远离麻烦!
  • JSHint is a code-checking tools that'll save you loads of time finding stupid errors. Find a plugin for your text editor that will automatically run it on your code.
  • JSHint是一个代码检查工具,它可以为您节省大量的时间来发现愚蠢的错误。为您的文本编辑器找到一个插件,它将自动运行在您的代码上。

Unit Testing:

单元测试:

  • Mocha is a popular test framework.
  • Mocha是一个流行的测试框架。
  • Vows is a fantastic take on asynchronous testing, albeit somewhat stale.
  • 誓言是一种奇妙的异步测试,尽管有些陈旧。
  • Expresso is a more traditional unit testing framework.
  • Expresso是一个更传统的单元测试框架。
  • node-unit is another relatively traditional unit testing framework.
  • 节点单元是另一个相对传统的单元测试框架。
  • AVA is a new test runner with Babel built-in and runs tests concurrently.
  • AVA是一个新的测试运行器,它内置了Babel,并发运行测试。

Web Frameworks:

Web框架:

  • Express.js is by far the most popular framework.
  • 表达。js是目前为止最流行的框架。
  • Koa is a new web framework designed by the team behind Express.js, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.
  • Koa是一个新的web框架,由团队在Express后面设计。js旨在为web应用程序和api提供更小、更有表现力和更健壮的基础。
  • sails.js the most popular MVC framework for Node.js, and is based on express. It is designed to emulate the familiar MVC pattern of frameworks like Ruby on Rails, but with support for the requirements of modern apps: data-driven APIs with a scalable, service-oriented architecture.
  • 帆。js是最流行的节点MVC框架。是基于express的。它的设计目的是模仿像Ruby on Rails这样熟悉的MVC模式,但它支持现代应用的需求:以数据驱动的api,具有可伸缩的面向服务的体系结构。
  • Meteor bundles together jQuery, Handlebars, Node.js, WebSocket, MongoDB, and DDP and promotes convention over configuration without being a Ruby on Rails clone.
  • 流星将jQuery、Handlebars、Node连接在一起。js、WebSocket、MongoDB和DDP,并在不使用Ruby on Rails克隆的情况下促进约定优于配置。
  • Tower (deprecated) is an abstraction of top of Express.js that aims to be a Ruby on Rails clone.
  • 塔(弃用)是Express的顶部的抽象。它的目标是成为一个Ruby on Rails克隆。
  • Geddy is another take on web frameworks.
  • Geddy是另一种web框架。
  • RailwayJS is a Ruby on Rails inspired MVC web framework.
  • RailwayJS是一个Ruby on Rails启发的MVC web框架。
  • Sleek.js is a simple web framework, built upon Express.js.
  • 光滑的。js是一个简单的web框架,构建在Express.js之上。
  • Hapi is a configuration-centric framework with built-in support for input validation, caching, authentication, etc.
  • Hapi是一个以配置为中心的框架,内置支持输入验证、缓存、身份验证等。
  • Trails is a modern web application framework. It builds on the pedigree of Rails and Grails to accelerate development by adhering to a straightforward, convention-based, API-driven design philosophy.

    Trails是一个现代的web应用程序框架。它建立在Rails和Grails的谱系之上,通过遵循一个简单的、基于常规的、由api驱动的设计理念来加速开发。

  • Danf is a full-stack OOP framework providing many features in order to produce a scalable, maintainable, testable and performant applications and allowing to code the same way on both the server (Node.js) and client (browser) sides.

    Danf是一个全面的OOP框架,它提供了许多特性,以生成可伸缩、可维护、可测试和性能的应用程序,并允许在服务器(Node.js)和客户端(浏览器)方面使用相同的代码。

  • Derbyjs is a reactive full-stack JavaScript framework. They are using patterns like reactive programming and isomorphic JavaScript for a long time.

    Derbyjs是一个无反应的全栈JavaScript框架。他们在很长一段时间内都在使用像反应性编程和同构JavaScript这样的模式。

  • Loopback.io is a powerful Node.js framework for creating APIs and easily connecting to backend data sources. It has a Angular.js SDK and provides SDKs for iOS and Android.

    回送。io是一个强大的节点。js框架用于创建api和方便地连接到后端数据源。它有一个角。js SDK为iOS和Android提供SDK。

Web Framework Tools:

Web框架工具:

  • Jade is the HAML/Slim of the Node.js world
  • Jade是节点的HAML/Slim。js的世界
  • EJS is a more traditional templating language.
  • EJS是一种更传统的模板语言。
  • Don't forget about Underscore's template method!
  • 不要忘记下划线的模板方法!

Networking:

网络:

  • Connect is the Rack or WSGI of the Node.js world.
  • 连接是节点的机架或WSGI。js的世界。
  • Request is a very popular HTTP request library.
  • Request是一个非常流行的HTTP请求库。
  • socket.io is handy for building WebSocket servers.
  • 套接字。io对于构建WebSocket服务器很方便。

Command Line Interaction:

命令行交互:

  • minimist just command line argument parsing.
  • 最小化命令行参数解析。
  • Yargs is a powerful library for parsing command-line arguments.
  • Yargs是一个强大的解析命令行参数的库。
  • Commander.js is a complete solution for building single-use command-line applications.
  • 指挥官。js是构建单用途命令行应用程序的完整解决方案。
  • Vorpal.js is a framework for building mature, immersive command-line applications.
  • 类别。js是一个用于构建成熟的、沉浸式命令行应用程序的框架。
  • Chalk makes your CLI output pretty.
  • 粉笔使您的CLI输出漂亮。

Work with streams:

使用流:

#3


117  

Use the source, Luke.

使用源,卢克。

No, but seriously I found that building Node.js from source, running the tests, and looking at the benchmarks did get me on the right track. From there, the .js files in the lib directory are a good place to look, especially the file http.js.

不,但我真的发现了那个建筑节点。来自源代码的js,运行测试,查看基准测试确实让我走上了正确的道路。从那里,lib目录中的.js文件是一个值得查看的好地方,尤其是文件http.js。

Update: I wrote this answer over a year ago, and since that time there has explosion in the number of great resources available for people learning Node.js. Though I still believe diving into the source is worthwhile, I think that there are now better ways to get started. I would suggest some of the books on Node.js that are starting to come out.

更新:我在一年前就写了这个答案,从那时起,人们学习Node.js的大量资源就出现了爆炸式的增长。尽管我仍然相信深入研究这个源头是值得的,但我认为现在有更好的方法开始了。我建议一些关于Node的书。js开始出现了。

#1


4321  

Tutorials

教程

Developer Sites

开发网站

Videos

视频

Screencasts

截屏

Books

Courses

课程

Blogs

博客

Podcasts

播客

JavaScript resources

JavaScript资源

Node.js Modules

节点。js模块

Other

其他

#2


1699  

First, learn the core concepts of Node.js:

首先,学习Node.js的核心概念:

Then, you're going to want to see what the community has to offer:

然后,你会想看看社区提供了什么:

The gold standard for Node.js package management is NPM.

节点的黄金标准。js包管理是NPM。

Finally, you're going to want to know what some of the more popular packages are for various tasks:

最后,你会想知道一些比较流行的包是用来做各种各样的任务的:

Useful Tools for Every Project:

每个项目有用的工具:

  • Underscore contains just about every core utility method you want.
  • 下划线包含您想要的所有核心实用程序方法。
  • Lo-Dash is a clone of Underscore that aims to be faster, more customizable, and has quite a few functions that underscore doesn't have. Certain versions of it can be used as drop-in replacements of underscore.
  • Lo-Dash是下划线的一个克隆,它的目标是更快、更可定制,并且有很多下划线的功能。它的某些版本可以用作下划线替换。
  • TypeScript makes JavaScript considerably more bearable, while also keeping you out of trouble!
  • 打字稿使JavaScript更容易忍受,同时也让你远离麻烦!
  • JSHint is a code-checking tools that'll save you loads of time finding stupid errors. Find a plugin for your text editor that will automatically run it on your code.
  • JSHint是一个代码检查工具,它可以为您节省大量的时间来发现愚蠢的错误。为您的文本编辑器找到一个插件,它将自动运行在您的代码上。

Unit Testing:

单元测试:

  • Mocha is a popular test framework.
  • Mocha是一个流行的测试框架。
  • Vows is a fantastic take on asynchronous testing, albeit somewhat stale.
  • 誓言是一种奇妙的异步测试,尽管有些陈旧。
  • Expresso is a more traditional unit testing framework.
  • Expresso是一个更传统的单元测试框架。
  • node-unit is another relatively traditional unit testing framework.
  • 节点单元是另一个相对传统的单元测试框架。
  • AVA is a new test runner with Babel built-in and runs tests concurrently.
  • AVA是一个新的测试运行器,它内置了Babel,并发运行测试。

Web Frameworks:

Web框架:

  • Express.js is by far the most popular framework.
  • 表达。js是目前为止最流行的框架。
  • Koa is a new web framework designed by the team behind Express.js, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.
  • Koa是一个新的web框架,由团队在Express后面设计。js旨在为web应用程序和api提供更小、更有表现力和更健壮的基础。
  • sails.js the most popular MVC framework for Node.js, and is based on express. It is designed to emulate the familiar MVC pattern of frameworks like Ruby on Rails, but with support for the requirements of modern apps: data-driven APIs with a scalable, service-oriented architecture.
  • 帆。js是最流行的节点MVC框架。是基于express的。它的设计目的是模仿像Ruby on Rails这样熟悉的MVC模式,但它支持现代应用的需求:以数据驱动的api,具有可伸缩的面向服务的体系结构。
  • Meteor bundles together jQuery, Handlebars, Node.js, WebSocket, MongoDB, and DDP and promotes convention over configuration without being a Ruby on Rails clone.
  • 流星将jQuery、Handlebars、Node连接在一起。js、WebSocket、MongoDB和DDP,并在不使用Ruby on Rails克隆的情况下促进约定优于配置。
  • Tower (deprecated) is an abstraction of top of Express.js that aims to be a Ruby on Rails clone.
  • 塔(弃用)是Express的顶部的抽象。它的目标是成为一个Ruby on Rails克隆。
  • Geddy is another take on web frameworks.
  • Geddy是另一种web框架。
  • RailwayJS is a Ruby on Rails inspired MVC web framework.
  • RailwayJS是一个Ruby on Rails启发的MVC web框架。
  • Sleek.js is a simple web framework, built upon Express.js.
  • 光滑的。js是一个简单的web框架,构建在Express.js之上。
  • Hapi is a configuration-centric framework with built-in support for input validation, caching, authentication, etc.
  • Hapi是一个以配置为中心的框架,内置支持输入验证、缓存、身份验证等。
  • Trails is a modern web application framework. It builds on the pedigree of Rails and Grails to accelerate development by adhering to a straightforward, convention-based, API-driven design philosophy.

    Trails是一个现代的web应用程序框架。它建立在Rails和Grails的谱系之上,通过遵循一个简单的、基于常规的、由api驱动的设计理念来加速开发。

  • Danf is a full-stack OOP framework providing many features in order to produce a scalable, maintainable, testable and performant applications and allowing to code the same way on both the server (Node.js) and client (browser) sides.

    Danf是一个全面的OOP框架,它提供了许多特性,以生成可伸缩、可维护、可测试和性能的应用程序,并允许在服务器(Node.js)和客户端(浏览器)方面使用相同的代码。

  • Derbyjs is a reactive full-stack JavaScript framework. They are using patterns like reactive programming and isomorphic JavaScript for a long time.

    Derbyjs是一个无反应的全栈JavaScript框架。他们在很长一段时间内都在使用像反应性编程和同构JavaScript这样的模式。

  • Loopback.io is a powerful Node.js framework for creating APIs and easily connecting to backend data sources. It has a Angular.js SDK and provides SDKs for iOS and Android.

    回送。io是一个强大的节点。js框架用于创建api和方便地连接到后端数据源。它有一个角。js SDK为iOS和Android提供SDK。

Web Framework Tools:

Web框架工具:

  • Jade is the HAML/Slim of the Node.js world
  • Jade是节点的HAML/Slim。js的世界
  • EJS is a more traditional templating language.
  • EJS是一种更传统的模板语言。
  • Don't forget about Underscore's template method!
  • 不要忘记下划线的模板方法!

Networking:

网络:

  • Connect is the Rack or WSGI of the Node.js world.
  • 连接是节点的机架或WSGI。js的世界。
  • Request is a very popular HTTP request library.
  • Request是一个非常流行的HTTP请求库。
  • socket.io is handy for building WebSocket servers.
  • 套接字。io对于构建WebSocket服务器很方便。

Command Line Interaction:

命令行交互:

  • minimist just command line argument parsing.
  • 最小化命令行参数解析。
  • Yargs is a powerful library for parsing command-line arguments.
  • Yargs是一个强大的解析命令行参数的库。
  • Commander.js is a complete solution for building single-use command-line applications.
  • 指挥官。js是构建单用途命令行应用程序的完整解决方案。
  • Vorpal.js is a framework for building mature, immersive command-line applications.
  • 类别。js是一个用于构建成熟的、沉浸式命令行应用程序的框架。
  • Chalk makes your CLI output pretty.
  • 粉笔使您的CLI输出漂亮。

Work with streams:

使用流:

#3


117  

Use the source, Luke.

使用源,卢克。

No, but seriously I found that building Node.js from source, running the tests, and looking at the benchmarks did get me on the right track. From there, the .js files in the lib directory are a good place to look, especially the file http.js.

不,但我真的发现了那个建筑节点。来自源代码的js,运行测试,查看基准测试确实让我走上了正确的道路。从那里,lib目录中的.js文件是一个值得查看的好地方,尤其是文件http.js。

Update: I wrote this answer over a year ago, and since that time there has explosion in the number of great resources available for people learning Node.js. Though I still believe diving into the source is worthwhile, I think that there are now better ways to get started. I would suggest some of the books on Node.js that are starting to come out.

更新:我在一年前就写了这个答案,从那时起,人们学习Node.js的大量资源就出现了爆炸式的增长。尽管我仍然相信深入研究这个源头是值得的,但我认为现在有更好的方法开始了。我建议一些关于Node的书。js开始出现了。