Document directory
Understanding callback Mode
Understanding event transmitter Mode
Understanding event types
Use the event transmitter API
Create an event Transmitter
For the list of articles in this series and the translation progress, see Node. js advanced programming: using Javascript to build scalable applications (〇)
This article corresponds to the
Using pm2 to deploy multiple node. js projects, pm2node. js
Preface
I believe everyone knows that in actual project deployment, the node service needs to be automatically started when the server is started. Previously, it was started u
"video/", picture file jpeg is "image/", ... There are many more formats on the Internet, and we have to implement them one by one, which makes it a unified and convenient MIME module for reuse.2. Use the MIME module to set the file typeTo use the MIME module, we must first learn the NPM tool. NPM is a package management and distribution tool that has now become the unofficial standard for publishing node modules (packages). With NPM, we can quickly
This article mainly introduces what is Node. js? What are the advantages of Node. js ?, To try to explain what Node is. js, this article will briefly introduce some background information: the problem to be solved, how it works, h
Document directory
Use setTimeout to delay function execution
Use clearTimeout to cancel an execution plan
Develop and cancel repeated execution plans for Functions
Use process. nextTick to delay function execution to the next round of the event Loop
Congestion event Loop
Exit event Loop
Use setTimeout instead of setInterval to ensure the serialization of function execution
For the list of articles in this series and the translation progress, see
This article mainly introduces how Js dynamically adds node content to a form. It provides examples of common tips for adding JavaScript nodes to a form, for more information about how to dynamically add node content to a form using Js, see the following example. Share it wi
Original address: Http://www.oschina.net/p/browserifyBrowserify allows you to organize your browser-side JavaScript code in a way that is similar to Node's require (), which allows front-end JavaScript to directly use some of the libraries that node NPM installs.Installation:Install -G browserifyExampleThis is the content of Main.js, which uses require () to load libraries and files as normal Nodejs programs: var foo = require ('./foo.js '); var bar =
Document directory
Create a buffer
Obtain and set buffered data
Split and buffer data
Copy buffered data
Decodes buffered data
For the list of articles in this series and the translation progress, see Node. js advanced programming: using Javascript to build scalable applications (〇)
This article corresponds to the original article Part 2 Chapter 4:
When it comes to server-side JavaScript, many people first respond to Node. js. Java 6 contains the Script Engine, which comes with a JavaScript interpreter implemented by Mozilla Rhino-pure Java of the "castrated version.Use jrunscript to start the interpreter. The advantage of using Rhino is that you can use the JavaScript language for development, but you can
create a new app, or get started with node. JS Development-Using cookies to keep The Logindemo example in login. are.Add a file you write yourselfThere are three self-written files, ngdialog.html and servertpl.html files placed under the public directory of the project, Ngdialog.js under Public/javascripts. Ngdialog.html content: Ngdialog.js content: Angular.
$("article")
Then traverse all the nodes and find the a tag under H2 with the following statement
1
varlink = $(e).find("h2>a");
Similarly, I can use the following statement to find the author's name
1
varposter = $(e).find("username").text();
Hopefully you'll get some fun from this article about node. js and Chreerio. Please t
a file descriptor (FD), which I pass to Fs.createwritestream to create a Fs.writestream instance, and then use it to write the file.Other articles:
Getting Started with node. JS Development-SOCKET (socket) programming
node. JS Development Primer--notepad++ for node
The topic of this article is to use node to build the simplest web server. Later, you can learn more about it as needed. Currently, it can be used to simulate simple interaction with the server during the development process, for example, return resource control. If you want to learn more, let's take a look. The topic of this article is to use node to build the simplest web server. Later, you can learn more
Coffeescript as a low-key JavaScript little brother is really a big thing, using it to improve development efficiency, reduce code errors, the key is to greatly enhance the development of pleasure. It is more and more that I find it possible to use coffee in my own projects. But maybe you're just like me, and when you're ready to try your hand at Coffeescript's grammar, you're worried about how to bring it into the project. In fact coffeescript this l
good News: Now we can debug node. js with our browser!!!Premise
node. js 6.3+, which can be downloaded on the node. JS website;
Chrome 55+. If your local chrome is upgraded to the latest version or
Configuration
templates:
grunt-init-commonjs-create a commonjs module, including Nodeunit unit tests.
grunt-init-gruntfile- Create a basic gruntfile.
grunt-init-gruntplugin -Create a Grunt plugin, including Nodeunit unit tests.
grunt-init-jquery- Create a jQuery plugin, including Qunit unit tests.
grunt-init-node- Create a node. js module, inclu
: $all # required-stop: $allSo in the future when you join the system will prompt the error, so in the Start Script node Project I added a previous string of description gaze, so that the Ubuntu server system settings, assuming on the CentOS. There should be no such problem, pay special attention to this point!That is, the following description information:# # # BEGIN INIT info# provides:xiyoulib# required-start: $all # required-stop: $all # de
in the set-top box set, send it to him.Recent attention to node. JS, isn't that the feature of node NiO?Let's start with refactoring, using the innate advantages of node. js, high concurrency, non-blockingFirst, encapsulate the c
Preface using Nodejs to build a Web server is a comprehensive introductory tutorial for node. js, because to complete a simple Web server, you need to learn some of the more important modules in Nodejs, such as: HTTP protocol module, file system, URL parsing module, path parsing module, and the 301 redirect problem, let's talk a little bit about how to build a si
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.