current working directory
PROCESS.ENV Environment variables
Process.exit exit
Signal Volume
Sixth Chapter TCPTCP
Connection-oriented, IP-based protocol
The IP protocol is out of order, TCP sends the IP containing the identifier and the data flow sequence information
byte-oriented character and character encoding are completely ignorant, good flexibility
Reliability three times handshake, window time re-hair
Flow control, speed control for receiving and
current working directory
PROCESS.ENV Environment variables
Process.exit exit
Signal Volume
Sixth Chapter TCPTCP
Connection-oriented, IP-based protocol
The IP protocol is out of order, TCP sends the IP containing the identifier and the data flow sequence information
byte-oriented character and character encoding are completely ignorant, good flexibility
Reliability three times handshake, window time re-hair
Flow control, speed control for receiving and
Node. js is based on Google V8, and Google V8 has an Eclipse debugging plug-in that also supports node. js.
1. Install Eclipse debugger for V8
This should be known to anyone who has used Eclipse, but let's simply put it:
Select "Install New Software"
Click "Add"
Location: http://chromedevtools.googlecode.com/s
prompts the port to be occupied the next time you want to build
function logger(req,res,next){
console.log(‘%s %s‘,req.method,req.url);
next();
}
function hello(req,res){
res.setHeader(‘Content-Type‘,‘text/plain‘);
res.end(‘hello world‘);
}
var connect=require(‘connect‘);
var app=connect();
app.use(logger).use(hello).l
the database level, the role of blockchain is to store transaction data. So where do you put the logic to vote for the candidate, or to retrieve the results of the poll? In the Ethereum world, you can use Solidity language to write business logic/application code (i.e. contract: Contract ), then compile the contract code into Ethereum bytecode and deploy the bytecode to the blockchain:Writing contract code can also be used in other languages, though? Solidity Is by far the most popular choice.E
state of the thread and restores its control over the CPU to continue execution. This I/O pattern is the usual synchronous I/O (synchronous I/O).
asynchronous I/O: When a thread encounters an I/O operation, it does not block the completion of the I/O operation or the return of the data, but simply sends the I/O request to the operating system and proceeds to the next statement. When the operating system completes an I/O operation, the thread that notifies the I/O operation as an event
First of all, it is not my client playing griping at everything to play cross-border, and the code is not my writing, but I look for.Directly on the code address, do not want to see the nagging directly download the code is OK.Https://github.com/andygrn/Node.js-File-ServerAfter downloading the code, drag the server.js directly to the Node.exe icon to run, in the browser access http://127.0.0.1:80/can directly connect to the download server.1, why shou
://r.cnpmjs.org/) install cnpm -g With the CNPM command line, you can quickly synchronize any module:$ cnpm sync koa connect mocha Well, I just don't want to install the CNPM CLI. Haha, I thought you would be so lazy, so we have a Web page:For example I want to sync koa immediately, open the browser directly: Http://cnpmjs.org/sync/koaOr you are command-line, open with the opening command:$ open [http://cnpmjs.org/sync/koa](http://cnpmjs.org/sync/ko
= "places where all static resources are stored, such as CSS JS images First of all, we introduce the steps of node. js to connect MySQL, the first step is to install a npm called MySQL package, the package is officially provided, stability is guaranteed, of course, there are other NPM packages, here we only use MyS
How does Nodejs use MySQL?To connect Nodejs to MySQL, you can use the MysQL driver of Nodejs. For example, here we use "node-mysql" to connect to the database. We use the following method to connect to the database:First, we need to use nodejs's package management tool (npm) to install the mysql driver. T
to see the document and tutorials, please go to the official website:
Http://expressjs.com
The source code of Express is hosted here:
Https://github.com/visionmedia/express
Express uses the connect middleware. The CONNECT documentation is here:
Http://senchalabs.github.com/connect/
If you want to perform unit testing, you can look at the TDD framework
introduces the FS module, the file system module, through the read stream, read an HTML file, and then pipe is the meaning of "pipe", the role is to connect the I/O pipeline file stream to the res response stream (in fact, I/O pipeline), like a tap, The water is from one to the other to the Truth.All of these flow operations are performed asynchronously, and no matter which pipe "water" slows down the operation of
A Simple Method for reading and writing Redis databases in Node. js applications
This article mainly introduces a simple method for reading and writing Redis databases in Node. js applications. Redis is a memory-based high-speed database. For more information, see
Before starting this article, make sure that you have i
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 from, and Writing to Files
The article is copi
echo to be more like echo, I call the readline module to read data from the standard input and send it to the client. The readline documentation is here: https://nodejs.org/api/readline.html. Just like its name, Readline allows you to read a stream in one row. It is common to read standard input streams. There are some events in Readline. The "line" event we use will be launched when a row of data is ready, with a parameter representing the data. I listen to the line event and call the net. Soc
summary of the final test results on each browser (for example, 15 of 16 passes and 1 fails ), unfortunately, you can only view the information in the terminal window.
A prominent feature of Karma is that you can use any device in the network to connect and test your code. Try to direct your mobile browser to the Karma service. You can find the URL of this test on any running browser on your computer. It should be similar to: http: // localhost: 9876
Node. JS Database Chapter--mongoose ODM Introduction MongooseAlmost all languages have a native database connection driver, this we have learned on the last time, such as Java Jdbc,mysql-connector, but the actual development in order to pursue efficiency will not use the original connection, not always establish a connection, the last one, Our registration and landing each write a connection operation, at l
Tags: Verify options note localhost crud pre type unique MonThis article focuses on installing the basic tutorial using Mongoose to let node. js operate MongoDB, front-end js+ back-end Node+js Operation MongoDB is the so-called most popular kind of JavaScript full stack deve
is equivalent to a subject (Subject), and all the processing functions registered to the event are equivalent to the Observer (Observer).node. JS has multiple built-in events, and we can bind and listen to events by introducing the events module and instantiating the Eventemitter class, as in the following example:Introduce the events module var events = require (' events ');//Create Eventemitter object va
Introduction to using Redis in Node. js applications
Before starting this article, make sure that you have installed Redis, Node. js, and Node. js Redis extensions-node_redis
First, create a new folder and create a text file app.
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.