-
Advantage:
-
Performance, node.js faster than php 86 times.
-
The front desk with convenient js
-
Node.js front end to facilitate learning
-
-
Running node.js need to run the directory node
-
js usable, node.js can use
-
web ----- 80 port, port 110 -----mail, database port 3306 -----
-
node.js ------ server
-
fs.readFile (file name, the callback function) fs.writeFile (file name, content, callback)
-
Www file request file in a project can have only one ---- www folder
-
http module, fs module;
-
Data Request:
-
Front desk --- from, ajax, jsonp
-
As background -----
-
Reception <---> background (both through http request)
-
Different ways ---- GET request (data url), post (data not url)
-
-
Resolve the port is occupied: CMD> netstat -ano | findstr 8080 CMD> taskkill / F / PID 1234 (process 1234 IV below show the number)
-
GET data analysis
-
Cut yourself
-
querystring xxx=xxx&xxx=xxx
-
urlLib aaa?xxx=xx&xx=12
-
urlLib.parse(url,true) parhname
-
query
-
-
POST data request: POST data is much larger than the GET data
-
POST great need ---- --- transmission segment receiving segment
-
-
register log in
First, determine the interface:
-
(Registered) has a user interface to: / user act = reg & user = aaa & pass = 123456?
Reception is returned to a json --- { "OK": false, "msg", "Cause"}
-
(Log) has a user interface to: / user act = login & user = aaa & pass = 123456?
Reception is returned to a json --- { "OK": true, "msg", "Cause"}
-
-
Activity: file access, interfaces access
-
Modular:
-
System module; http, querystring, url
-
Custom Modules
-
Package Manager
-
-
Crypto encryption
Events Events
Net network operations
OS operating system information
Path processing file path
-
Custom modules:
-
Modules
-
asl
-
Post your own module
-
-
----- external output something must be added to exports
-
-
About node.js study notes
Guess you like
Origin www.cnblogs.com/dys6/p/11328970.html
Recommended
Ranking