This year, we have been using Alibaba Cloud products.
Node. js In the industry, there are two major problems:
Node. js はじめに
Recently, many others have been using JavaScript in our environment.Node. jsWhen there are too many other users, there are too many other users.
Node
Zhanhailiang Date: 2014-11-281. Connect to MySQL
Mysql:https://www.npmjs.org/package/mysql
Instruction for use: node. js MySQL Package usage instructions
2. Connect to Redis
Redis:https://www.npmjs.org/package/redis
Instruction for use: fast implementation of real-time online user statistics based on Express+redis
3. Connect MongoDB
REST + MongoDB build service side, front end is HTML + CSS + JS + Jquery (at that time the front end is not used MVC), server when IIS.Our project name is "based on XXXX Service", later, the results are good, took a good result. I think the practice of WCF is quite cool, and later in the senior company internship also made a point of WCF services. Specific practices such as:The whole project is not elabora
this week is still pretty good, the problem is still put on Evernote. The problem has also appeared before is the difference between localhost and 127.0.0.1. This week in debugging JS Process learned a function, you can let JS like PHP dump an object. Now post it below to share.1 functionDump (arr,level) {2 varDumped_text = "";3 if(!level) level = 0;4 5 //The padding given at the beginning.
What is node. js?node. js is the JavaScript language used on the server side.Its function is like PHP + Apache.node. JS has built-in HTTP server support.node. JS follows the modular approach of COMMONJS. HTTP is one of the modules
directory to contain the project:
(Study)That is, you can enter the directory name of the project. By default, the name of the project you just entered is the directory name (for example, you can directly add a vehicle here). Then StrongLoop will create a directory for you, and create the default project file and the default node. js module. After that, the project is created.
Appendix: You can also creat
threads.ModuleFile and module one by one corresponding, a file is a module, exposed to a number of external module.exports, exposed to a exportsJS single-threaded and asynchronousSingle-threaded and asynchronous does not have to be a language feature at the same time. JS chose to become a single-threaded language, so it can not be asynchronous, but JS hosting en
Tags: style blog http io ar color OS using SP1. Connect to MySQL
Mysql:https://www.npmjs.org/package/mysql
Instruction for use: node. js MySQL Package usage instructions
2. Connect to Redis
Redis:https://www.npmjs.org/package/redis
Instruction for use: fast implementation of real-time online user statistics based on Express+redis
3. Connect
directory to contain the project: (study) , which allows you to enter the catalog name of the item, the project name that you just entered is the directory name (for example: if you add a car here directly)
Next Strongloop will create the directory for you and create the default project file and the default node. js module, after which the project is finished.attached : You can also create a new direct
The first step is naturally installed, I am using webstorm this IDE, the installation is divided into 2 steps:1, install Nodejs, download the installation version under Windows, note that the MSI is the extension, and then the next step, nothing to say, as follows:32-bit msi:http://nodejs.org/dist/latest/64-bit msi:http://nodejs.org/dist/latest/2, install WebStorm8.0.3, as if will automatically find Nodejs installation path, do not need to configure what East;Install Webstorm, start it, then cre
PHP Development Technology Stack (LAMP) Linux Apache MySql phpnode. JS full stack development technology stack (MEAN): MongoDB Express Angular node. jsObjectives of the current study:
Understanding the server development process
Uses node. js to develop a basic
Why use node to write crawlers? It is because the cheerio library is fully compatible with jQuery syntax. If you are familiar with it, it is really cool to use cheerio: Node. jQueryhttp for js: encapsulates an HTPP server and a simple HTTP client iconv-lite: solution... why use node to write crawlers? Because the cheer
This is a creation in
Article, where the information may have evolved or changed.
Looking back over the past year, the biggest change we have on the technology stack is switching from node. js to go. Our co-founder, Steve Kaliski, switched node. js to Go in Poptip, but he didn't learn the lessons at the tim
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
encryption is also very simple easy, is the ordinary hash added a salt value. Return to the theme, found that this module can also generate a random number, so, hee,/** * Gets a random 10-digit number */exports.validcode =function (callback) { crypto.randombytes (10,function (ex,buf) { if (ex) Throw ex; Callback (BUF); });Carefully looked at, all is the bug, the road is still very long ah, next completes the login, then is consummates this several modules, the log, the encry
Object corresponds to documentCreate the project directory and enter it with Root# mkdir/home/test/part9/Direct # NPM Install Mongoose, error is as follows.. /node_modules/nan/nan.h:316:47:error: ' Replace_invalid_utf8 ' is not a member of ' v8::string 'static const unsigned KREPLACEINVALIDUTF8 = V8::string::replace_invalid_utf8;^Make: * * * [RELEASE/OBJ.TARGET/KERBEROS/LIB/KERBEROS.O] Error 1make:leaving directory '/home/test/part9/node_modules/mongoose/node_modules/
", " Jshint ":" Jshint API collections Config Controllers env Lib models public/javascripts routes test App.js ", " test ":" NPM run jshint mocha Test ",
"Precommit": "NPM Test", "Prepush": "NPM shrinkwrap npm test", " postmerge": "NPM Install" } ...}
Some of the modules I used a lot.
Express-app Frameworks
Bookshelf-postgres and MySQL's ORM
Lodash-Tools Library
Passport-Validation
Mongoose-m
This article introduces the use of Node. js is Node. js generates the HttpStatusCode helper class and releases it to npm. If you need it, you can refer to it. As a good Restfull Api, not only does it lie in the semantics, readability, power, and orthogonal of service URLs, as an http Status Code, it is also very import
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.