This article mainly introduces node. socket. js. i/O advanced usage skills. This article describes the configuration, room, event, authorization, and other content. For more information, see Socket in the previous blog. IO, I briefly introduced Socket. i/O basic usage and a simple chat room DEMO is created. This article will continue to explore the
HTTP session function in our usual sense is implemented. Specifically, when the browser initiates a request to the server for the first time, the server generates a unique identifier and sends it to the client browser, which stores the unique identifier in a cookie and the client browser sends the unique identifier to the server each time it is requested. The server uses this unique identifier to identify the user.5.7, published micro-Boulhosa6th Chapter no
, Query String)7. Learn about NPM and express8. jexpress example, simple page9. Template Engine Jade10, jade implementation of MongoDB home page effect11. Understanding Non-relational database MongoDB12. MongoDB Exploration, characteristics13, MongoDB basis of the increase and deletion14, the basis of MongoDB query15, MongoDB basis of the query 216. MongoDB IndexPart two, node. JS Project Combat (anonymous
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
Document directory
Process file path
Fs module Introduction
For the list of articles in this series and the translation progress, see Node. js advanced programming: using Javascript to build scalable applications (〇)
This document corresponds to the third part of the original article, Chapter 7: Files, Processes, Streams, and Networking: Querying, Reading f
Lodash Type judge the source code"hungry Big front Node. JS advanced tutorial" address: Https://github.com/ElemeFE/node-interviewLodash Introduction : Lodash is currently a very popular JS tool library, It encapsulates a lot of JS
wait for the hard disk, and when the hard disk is ready, the Non-blocking interface will notify the NodejsWhat is single thread/multithreading?A single thread corresponds to multithreadingSingle-threaded: the functions of the program are executed sequentially, and only the previous process is executed successfully,The subsequent process can be executed toSingle Thread features: secureEach has advantages and disadvantages, multithreading is to grasp the resource allocationWhat is blocking/non-bl
Node. js advanced core module. net introduction and instance description module Overview
The net module is also the core module of nodejs. As mentioned in the overview of the http module, http. Server inherits net. Server. In addition, communication between the http client and the http Server is dependent on socket (net. Socket ). That is to say, for
"Hungry big front node. JS Advanced Tutorial" Address: Https://github.com/ElemeFE/node-interview1. How to write a copy function of a JSON object
function Clone (obj) {
var result;
if (Array.isarray (obj)) {
result = [];
Obj.foreach (item) = {
Result.push (Clone (item));
});
} else i
ObjectiveJust answered Segmentfault's previous brother's question, "asymmetric decryption error." This belongs to node. js in the security of the application, meet the same problem should be a lot of people, based on the answer to the question, here is a brief summary.The theoretical knowledge of asymmetric encryption can be referred to the author's previous article "Nodejs
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
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:
Plus () { SetTimeout (function() { console.log (' aaa ') },+) C +=1;} Plus () print ()AsynchronousEach task has multiple callback functions, and the previous task does not perform the next task, but instead executes the callback function, and the latter task executes in the order in which the task is sorted, not waiting for the previous task to complete// asynchronously executes the callback function after the task execution completes var c=0function print () { console.log
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
Getting started with Node. js development-notepad ++ for Node. js and node. jsnotepad
For Node. js development, IDE,WebstormIt is the best option, but it is charged (free for 30 days )
This article mainly introduces a simple node. js server example. This article implements a simple helloworld example and shows how to run this server, for more information, see the following example: hello world.
It seems that the first section of each language tutorial will talk about this, and we are no exception.
First, create a project directory, which can be defined by yourself. In this case, the d
This article mainly introduces several important knowledge points of node. js: The Role of node. js, callback, synchronous and asynchronous code, event loop 1, and the role of node. js,
The meaning of I/O. Move the mouse to see t
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.