"" install "" node-inspector"
The module cannot be automatically installed even though it is in Russia. If there is an error, You can manually install the module ..
# ------------- Debug node-inspector/eclipse/webstorm
Node. js itself supports debugging (gdb is also not easy to use). You can add a breakpoint by add
Node. js supports multi-user web Terminal Implementation and security solutions, and node. js supports multiple users
As a common feature of local IDE, terminal (command line) supports git operations and file operations of projects. For WebIDE, without a web pseudo-terminal,
This article mainly introduces three unknown Node types. js Code optimization methods help you optimize code. If you are interested, refer to Node. the running of js programs may be limited by the CPU or input/output operations and very slow. From the CPU perspective, one of the typical causes of slow running is the un
you press enter, you will see:Copy codeThe Code is as follows:Express server listening on port 3000Great. Open your browser and enter http: // localhost: 3000. You should be able to see a welcome page of Express.
Now you have run your own Node JS WebServer with the Express engine and Ejs HTML template engine. Not very difficult, right?
Part 1-now, let's write "Hello, World !" Right
Open your frequently-
This article mainly introduces how to use VS to develop Node. the js method mainly uses NTVS (Node. jsToolsforVisualStudio). For more information, see NTVS (Node. jsToolsforVisualStudio) is an IDE tool that runs on VS2012 and VS2013. Using this plug-in is undoubtedly a good
This article mainly introduces how to use VS to develop Node. the js method mainly uses NTVS (Node. jsToolsforVisualStudio). For more information, see NTVS (Node. jsToolsforVisualStudio) is an IDE tool that runs on VS2012 and VS2013. Using this plug-in is undoubtedly a good
browser.
2. Create your own module
The namespace in node. js is independent.
Use require to introduce methods or variables of another module in one module
• Introduce the fnData Module
require("./fnData");
• Import and Export (export variables or functions)
module.exports = {myFn:test.myFn,a:test.a}
2. built-in modules
Nodejs built-in modules include Buffer, C/C ++ Addons, Child Processes, Cluster, Console
\":\"test11\"}}" http://localhost:3000/leaderboards
View the TOP 10 commands as follows:
curl http://localhost:3000/leaderboards
In standard REST definitions, POST and PUT have different meanings. GET can distinguish a single resource or a list of resources. We have simplified this application. Both ADD and UPDATE use POST in a unified manner, and there is no distinction between a single resource and a list. The TOP 10 Data is directly returned.
Some preparations
Install
'); Console.log ("payload", payload);Create a signature:To create the signature part of the encoded header, the encoded payload, a secret, the algorithm specified I n the header, and sign that.For example if your want to use the HMAC SHA256 algorithm, the signature would be created in the following-to-do:HMACSHA256 ( + "." + base64urlencode (payload), secret)Let key = header + '. ' += Crypto.createhmac (' sha256 ', ' Zhentian '= signature.digest (' base64 '= Header + '. ' +payload + '. ' + K
node's handy tip--Compression codeDownload ImageCompress CodeI believe many front-end students will be on the line before the compression JS code, now Gulp Webpack Grunt ... can be easily achieved. But the problem comes, these will not, it is necessary to face dozens of JS files back and forth "copy-compress-Create-paste", this is too impersonal.It can be easily implemented with
Github/joyent/node.js (start here last!)
A completely biased and incomplete selection of useful node. JS Modules
Other
Jsapp.us-like Jsfiddle, but for node. js
Node with Vjet JS (for Eclipse
devtool to replace existing tools such as Nodemon.--watchThis command will be launched in the console of the Chrome Developer tool, and the app.js --watch files we saved will be re-loaded (automatically) to the console via the parameters.By clicking app.js:1 on the link, the program will take Sources us to the relevant line in the tag.In the Sources tag, you can also tap the Cmd/Ctrl + P button to quickly search through all dependent modules. You can even review and debug built-in modules, such
/node (start here last!)
A completely biased and incomplete selection of useful Node modules
Additional tools and resources
Jsapp.us–like Jsfiddle, but for node. js
Node with Vjet JS (for Eclipse
/node (start here last!)
A completely biased and incomplete selection of useful Node modules
Additional tools and resources
Jsapp.us–like Jsfiddle, but for node. js
Node with Vjet JS (for Eclipse
Real Time Web with Node. jsBlogs
The Node. js blog
How To Node
DailyJS
Nodejitsu blog
Ryan Wilcox's Whitepaper
DevthoughtPodcasts
NodeUpJavaScript resources
Crockford's
suspended (the debugger tag is equivalent to opening a breakpoint in the Code ). The Code is as follows:
var path = url.parse(req.url).pathname;debugger;res.writeHead(200, {'Content-Type': 'text/plain'});
Run the command: node debug example. js to enter the debugging mode.
In debug mode, you can use built-in commands
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"
Loc
apt-get install nodejs
After the installation is complete, run the node-v command to check whether Node. js is successfully installed.
Install IDE:
WebStorm is recommended for Node. js IDE
heavily integrated languages such as Java or C #, you'll be bothered, most of the new node developers are using the ' flow ' debug mode, and from this moment your best friend is Console.log. But there are still more common debugging methods to replace, node. JS has built in a debugger you can call
in the Node kernel: The Event listener in http. ClientRequest was not released. (The patch that finally fixes this problem has only two but crucial letters ). This painful experience prompted Lloyd to write a tool that can help find memory leaks.
Memory Leak locating Tool
There are already many easy-to-use and constantly enhanced tools to locate the memory leakage of Node.
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.