This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var RESET = "\033[0m" | |
var BLACK = "\033[30m" /* Black */ | |
var RED = "\033[31m" /* Red */ | |
var GREEN = "\033[32m" /* Green */ | |
var YELLOW = "\033[33m" /* Yellow */ | |
var BLUE = "\033[34m" /* Blue */ | |
var MAGENTA = "\033[35m" /* Magenta */ | |
var CYAN = "\033[36m" /* Cyan */ | |
var WHITE = "\033[37m" /* White */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ipAddr = req.headers["x-forwarded-for"]; | |
if (ipAddr){ | |
var list = ipAddr.split(","); | |
ipAddr = list[list.length-1]; | |
} else { | |
ipAddr = req.connection.remoteAddress; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"1": { | |
"msg": "服务器内部错误或者参数错误,一般是因为传入了错误的参数,或者没有在本文档里明确定义的运行时错误,都会以代码 1 指代。", | |
"msg_en": "Internal server error. No information available." | |
}, | |
"100": { | |
"msg": "无法建立 TCP 连接到 LeanCloud 服务器,通常是因为网络故障,或者我们服务器故障引起的,我们的服务器状态可以查看 健康状态检查。", | |
"msg_en": "The connection to the AVOS servers failed." | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rsAstralRange = '\\ud800-\\udfff', | |
rsZWJ = '\\u200d', | |
rsVarRange = '\\ufe0e\\ufe0f', | |
rsComboMarksRange = '\\u0300-\\u036f', | |
reComboHalfMarksRange = '\\ufe20-\\ufe2f', | |
rsComboSymbolsRange = '\\u20d0-\\u20ff', | |
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; | |
let reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); | |
let rsFitz = '\\ud83c[\\udffb-\\udfff]', |