App.use the function of the regular expression/means what Nodejs pm2 how to install garbled how to solve the time:2017-05-23 00:18:43 Read:16 Comments:0 Favorites:0 [Point I collection +]
Tags: path order ash backslash ive format default record NEC
What is the role of App.use in the 1.express framework?
The manual reads:
App.use ([path], function) Use the given middleware function, with optional mount Path, defaulting to "/".
is to introduce a so-called middleware, is actually used to re-hack req and res objects before the actual request to achieve some functions, than if the simplest logger is to add a listener to the end event of Res write a log record, express using the middleware provided by connect ,
Next (); The program continues in order.
2. In regular expressions, where do the slashes "/" need to be escaped? What situations do not need to be escaped?
5
Tests the regular expression. Sometimes,/this symbol needs \/to represent. Sometimes,/direct use is possible. No escaping. what situations need to be escaped?
Normally/do not need to escape, unless you write JavaScript, because his patter is written "/..../", so the inside/need to escape.
Only backslashes need to be escaped,/direct use can be used to use \, need to use \ \ to escape
3. How to install PM2
After installation, run PM2/PM2 list-bash pm2 command not found
NPM installed Nodejs need to manually establish a soft connection
and Ln-s to/usr/local/bin.
PM2 List garbled
You can modify the format of the client encoding format to Utf-8.
App.use of the function of the regular expression/means what Nodejs pm2 how to install garbled how to solve