{"id":4480,"date":"2015-11-22T01:23:16","date_gmt":"2015-11-21T17:23:16","guid":{"rendered":"https:\/\/sdeno.com\/?p=4480"},"modified":"2016-07-04T20:47:43","modified_gmt":"2016-07-04T12:47:43","slug":"node-%e7%99%bb%e5%bd%95-%e4%b8%8a%e4%bc%a0","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=4480","title":{"rendered":"node \u767b\u5f55 \u4e0a\u4f20"},"content":{"rendered":"<p>\u670d\u52a1\u5668\u4ee3\u7801\uff1aserver.js<\/p>\n<div class=\"line number1 index0 alt2\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">http\u00a0=\u00a0require(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"http\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number2 index1 alt1\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">url\u00a0=\u00a0require(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"url\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number3 index2 alt2\" style=\"color: #505050;\"><\/div>\n<div class=\"line number4 index3 alt1\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">start(route,\u00a0handle)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number5 index4 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">onRequest(request,\u00a0response)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number6 index5 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">postData\u00a0=\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">;\u00a0<\/code><\/div>\n<div class=\"line number7 index6 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">pathname\u00a0=\u00a0url.parse(request.url).pathname;\u00a0<\/code><\/div>\n<div class=\"line number8 index7 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Request\u00a0for\u00a0\"<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0pathname\u00a0+\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\u00a0received.\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number9 index8 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">if<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">(pathname==<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'\/start'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">){<\/code><\/div>\n<div class=\"line number10 index9 alt1\" style=\"color: #505050;\"><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u767b\u5f55\u65b9\u6cd5\u4f7f\u7528<\/code><\/div>\n<div class=\"line number11 index10 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">request.setEncoding(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"utf8\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number12 index11 alt1\" style=\"color: #505050;\"><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u76d1\u542c\u5668<\/code><\/div>\n<div class=\"line number13 index12 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">request.addListener(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"data\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">,\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">(postDataChunk)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number14 index13 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\u83b7\u53d6\u6240\u6709\u7684\u6570\u636e\uff1a\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+postDataChunk);<\/code><\/div>\n<div class=\"line number15 index14 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">postData\u00a0+=\u00a0postDataChunk;\u00a0<\/code><\/div>\n<div class=\"line number16 index15 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'\u8d26\u53f7\u662f\uff1a'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+postData.split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&amp;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[0].split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'='<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[1]+<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'\u00a0\u5bc6\u7801\u662f\uff1a\u00a0'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+postData.split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&amp;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[1].split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'='<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[1]);\u00a0<\/code><\/div>\n<div class=\"line number17 index16 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number18 index17 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number19 index18 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">request.addListener(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"end\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">,\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">()\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number20 index19 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">route(handle,\u00a0pathname,\u00a0response,\u00a0postData);\u00a0<\/code><\/div>\n<div class=\"line number21 index20 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number22 index21 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number23 index22 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">else<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">{<\/code><\/div>\n<div class=\"line number24 index23 alt1\" style=\"color: #505050;\"><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u975e\u767b\u5f55\u65b9\u6cd5\u4f7f\u7528<\/code><\/div>\n<div class=\"line number25 index24 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">route(handle,\u00a0pathname,\u00a0response,\u00a0request);\u00a0<\/code><\/div>\n<div class=\"line number26 index25 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}<\/code><\/div>\n<div class=\"line number27 index26 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><\/div>\n<div class=\"line number28 index27 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}<\/code><\/div>\n<div class=\"line number29 index28 alt2\" style=\"color: #505050;\"><\/div>\n<div class=\"line number30 index29 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">http.createServer(onRequest).listen(8888);\u00a0<\/code><\/div>\n<div class=\"line number31 index30 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Server\u00a0has\u00a0started.\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number32 index31 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><\/div>\n<div class=\"line number33 index32 alt2\" style=\"color: #505050;\"><\/div>\n<div class=\"line number34 index33 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">exports.start\u00a0=\u00a0start;<\/code><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #505050;\">\u8def\u7531\u4ee3\u7801\uff1arouter.js<\/span><\/p>\n<div class=\"line number1 index0 alt2\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">route(handle,\u00a0pathname,\u00a0response,\u00a0request)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number2 index1 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"About\u00a0to\u00a0route\u00a0a\u00a0request\u00a0for\u00a0\"<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0pathname);\u00a0<\/code><\/div>\n<div class=\"line number3 index2 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">if<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">(<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">typeof<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">handle[pathname]\u00a0===\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'function'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number4 index3 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">handle[pathname](response,\u00a0request);\u00a0<\/code><\/div>\n<div class=\"line number5 index4 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">else<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">{\u00a0<\/code><\/div>\n<div class=\"line number6 index5 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"No\u00a0request\u00a0handler\u00a0found\u00a0for\u00a0\"<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0pathname);\u00a0<\/code><\/div>\n<div class=\"line number7 index6 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.writeHead(404,\u00a0{<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Content-Type\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">:\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"text\/html\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number8 index7 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.write(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"404\u00a0Not\u00a0found\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number9 index8 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.end();\u00a0<\/code><\/div>\n<div class=\"line number10 index9 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><\/div>\n<div class=\"line number11 index10 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><\/div>\n<div class=\"line number12 index11 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number13 index12 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">exports.route\u00a0=\u00a0route;<\/code><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #505050;\">\u8bbf\u95ee\u7684\u8def\u5f84\u4ee3\u7801\uff1aindex.js<\/span><\/p>\n<div class=\"line number1 index0 alt2\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">server\u00a0=\u00a0require(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\".\/server\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number2 index1 alt1\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">router\u00a0=\u00a0require(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\".\/router\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number3 index2 alt2\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">requestHandlers\u00a0=\u00a0require(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\".\/requestHandlers\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number4 index3 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number5 index4 alt2\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">handle\u00a0=\u00a0{}\u00a0<\/code><\/div>\n<div class=\"line number6 index5 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">handle[<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\/\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">]\u00a0=\u00a0requestHandlers.login;\u00a0<\/code><\/div>\n<div class=\"line number7 index6 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">handle[<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\/login\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">]\u00a0=\u00a0requestHandlers.login;\u00a0<\/code><\/div>\n<div class=\"line number8 index7 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">handle[<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\/start\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">]\u00a0=\u00a0requestHandlers.start;\u00a0<\/code><\/div>\n<div class=\"line number9 index8 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">handle[<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\/upload\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">]\u00a0=\u00a0requestHandlers.upload;\u00a0<\/code><\/div>\n<div class=\"line number10 index9 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">handle[<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\/show\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">]\u00a0=\u00a0requestHandlers.show;<\/code><\/div>\n<div class=\"line number11 index10 alt2\" style=\"color: #505050;\"><\/div>\n<div class=\"line number12 index11 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">server.start(router.route,\u00a0handle);<\/code><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #505050;\">\u8fd0\u884c\u65b9\u6cd5\u4ee3\u7801\uff1arequestHandlers.js<\/span><\/p>\n<div class=\"line number1 index0 alt2\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">querystring\u00a0=\u00a0require(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"querystring\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number2 index1 alt1\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">fs\u00a0=\u00a0require(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"fs\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);<\/code><\/div>\n<div class=\"line number3 index2 alt2\" style=\"color: #505050;\"><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u83b7\u53d6\u6587\u4ef6\u4e0a\u4f20\u6a21\u5757<\/code><\/div>\n<div class=\"line number4 index3 alt1\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">formidable\u00a0=\u00a0require(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"formidable\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number5 index4 alt2\" style=\"color: #505050;\"><\/div>\n<div class=\"line number6 index5 alt1\" style=\"color: #505050;\"><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u767b\u9646\u9875\u9762<\/code><\/div>\n<div class=\"line number7 index6 alt2\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">login(response,postData)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number8 index7 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Request\u00a0handler\u00a0'login'\u00a0was\u00a0called.\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number9 index8 alt2\" style=\"color: #505050;\"><\/div>\n<div class=\"line number10 index9 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">body\u00a0=\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;html&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number11 index10 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;head&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number12 index11 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;meta\u00a0http-equiv=\"Content-Type\"\u00a0content=\"text\/html;\u00a0'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number13 index12 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'charset=UTF-8\"\u00a0\/&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number14 index13 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;\/head&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number15 index14 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;body&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number16 index15 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;form\u00a0action=\"\/start\"\u00a0method=\"post\"&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number17 index16 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'\u8d26\u53f7\uff1a&lt;input\u00a0type=\"text\"\u00a0name=\"username\"\u00a0\/&gt;&lt;br\u00a0\/&gt;&lt;br\u00a0\/&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number18 index17 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'\u5bc6\u7801\uff1a&lt;input\u00a0type=\"password\"\u00a0name=\"password\"\u00a0\/&gt;&lt;br\u00a0\/&gt;&lt;br\u00a0\/&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number19 index18 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;input\u00a0type=\"submit\"\u00a0value=\"\u767b\u5f55\"\u00a0\/&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><\/div>\n<div class=\"line number20 index19 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;\/form&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number21 index20 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;\/body&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number22 index21 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;\/html&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">;\u00a0<\/code><\/div>\n<div class=\"line number23 index22 alt2\" style=\"color: #505050;\"><\/div>\n<div class=\"line number24 index23 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.writeHead(200,\u00a0{<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Content-Type\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">:\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"text\/html\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number25 index24 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.write(body);\u00a0<\/code><\/div>\n<div class=\"line number26 index25 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number27 index26 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.end();\u00a0<\/code><\/div>\n<div class=\"line number28 index27 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><\/div>\n<div class=\"line number29 index28 alt2\" style=\"color: #505050;\"><\/div>\n<div class=\"line number30 index29 alt1\" style=\"color: #505050;\"><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u4e0a\u4f20\u9875\u9762<\/code><\/div>\n<div class=\"line number31 index30 alt2\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">start(response,\u00a0postData)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number32 index31 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number33 index32 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">body2\u00a0=\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;html&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number34 index33 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;head&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number35 index34 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;meta\u00a0http-equiv=\"Content-Type\"\u00a0content=\"text\/html;\u00a0'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number36 index35 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'charset=UTF-8\"\u00a0\/&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number37 index36 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;\/head&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number38 index37 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;body&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number39 index38 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'\u4f60\u597d'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+postData.split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&amp;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[0].split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'='<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[1]+<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'\uff0c\u6b22\u8fce\u767b\u9646&lt;br\u00a0\/&gt;\u8d26\u53f7\u662f\uff1a\u00a0'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+postData.split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&amp;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[0].split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'='<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[1]+<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'\u00a0\u5bc6\u7801\u662f\uff1a\u00a0'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+postData.split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&amp;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[1].split(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'='<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">)[1]+<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;br\u00a0\/&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+<\/code><\/div>\n<div class=\"line number40 index39 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;form\u00a0action=\"\/upload\"\u00a0enctype=\"multipart\/form-data\"\u00a0method=\"post\"&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number41 index40 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;input\u00a0type=\"file\"\u00a0name=\"upload\"\u00a0multiple=\"multiple\"&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number42 index41 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;input\u00a0type=\"submit\"\u00a0value=\"\u4e0a\u4f20\u56fe\u7247\"\u00a0\/&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number43 index42 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;\/form&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number44 index43 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;\/body&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+\u00a0<\/code><\/div>\n<div class=\"line number45 index44 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">'&lt;\/html&gt;'<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">;\u00a0<\/code><\/div>\n<div class=\"line number46 index45 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number47 index46 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Request\u00a0handler\u00a0'upload'\u00a0was\u00a0called.\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number48 index47 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.writeHead(200,\u00a0{<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Content-Type\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">:\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"text\/html\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number49 index48 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.write(body2);<\/code><\/div>\n<div class=\"line number50 index49 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.end();\u00a0<\/code><\/div>\n<div class=\"line number51 index50 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><\/div>\n<div class=\"line number52 index51 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number53 index52 alt2\" style=\"color: #505050;\"><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u4e0a\u4f20\u65b9\u6cd5<\/code><\/div>\n<div class=\"line number54 index53 alt1\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">upload(response,\u00a0request)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number55 index54 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Request\u00a0handler\u00a0'upload'\u00a0was\u00a0called.\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number56 index55 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number57 index56 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">var<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">form\u00a0=\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">new<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">formidable.IncomingForm();\u00a0<\/code><\/div>\n<div class=\"line number58 index57 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"about\u00a0to\u00a0parse\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);<\/code><\/div>\n<div class=\"line number59 index58 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\u56fe\u7247\u8be6\u7ec6\u4fe1\u606f\uff1a\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">+form);<\/code><\/div>\n<div class=\"line number60 index59 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">form.parse(request,\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">(error,\u00a0fields,\u00a0files)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number61 index60 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"parsing\u00a0done\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number62 index61 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u4fee\u6539\u56fe\u7247\u540d\u79f0<\/code><\/div>\n<div class=\"line number63 index62 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">fs.renameSync(files.upload.path,\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\/tmp\/test.jpg\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number64 index63 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.writeHead(200,\u00a0{<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Content-Type\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">:\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"text\/html\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number65 index64 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u663e\u793a\u56fe\u7247\u540d\u79f0<\/code><\/div>\n<div class=\"line number66 index65 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.write(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"received\u00a0image:&lt;br\/&gt;\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number67 index66 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u663e\u793a\u56fe\u7247<\/code><\/div>\n<div class=\"line number68 index67 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.write(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"&lt;img\u00a0src='\/show'\u00a0style='width:500px;height:300px;'\/&gt;\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number69 index68 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.end();\u00a0<\/code><\/div>\n<div class=\"line number70 index69 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number71 index70 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><\/div>\n<div class=\"line number72 index71 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number73 index72 alt2\" style=\"color: #505050;\"><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u5c55\u793a\u65b9\u6cd5<\/code><\/div>\n<div class=\"line number74 index73 alt1\" style=\"color: #505050;\"><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">show(response)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number75 index74 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">console.log(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Request\u00a0handler\u00a0'show'\u00a0was\u00a0called.\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number76 index75 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u5bfb\u627e\u6587\u4ef6<\/code><\/div>\n<div class=\"line number77 index76 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">fs.readFile(<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\/tmp\/test.jpg\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">,\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"binary\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">,\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">function<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">(error,\u00a0file)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number78 index77 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">if<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">(error)\u00a0{\u00a0<\/code><\/div>\n<div class=\"line number79 index78 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.writeHead(500,\u00a0{<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Content-Type\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">:\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"text\/plain\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number80 index79 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.write(error\u00a0+\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"\\n\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number81 index80 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.end();\u00a0<\/code><\/div>\n<div class=\"line number82 index81 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><code class=\"js keyword\" style=\"font-weight: bold !important; font-style: normal !important; color: #006699 !important;\">else<\/code>\u00a0<code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">{\u00a0<\/code><\/div>\n<div class=\"line number83 index82 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js comments\" style=\"font-weight: normal !important; font-style: normal !important; color: #008200 !important;\">\/\/\u89c4\u5b9a\u6587\u4ef6\u540e\u7f00<\/code><\/div>\n<div class=\"line number84 index83 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.writeHead(200,\u00a0{<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"Content-Type\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">:\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"image\/jpg\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number85 index84 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.write(file,\u00a0<\/code><code class=\"js string\" style=\"font-weight: normal !important; font-style: normal !important; color: blue !important;\">\"binary\"<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">);\u00a0<\/code><\/div>\n<div class=\"line number86 index85 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">response.end();\u00a0<\/code><\/div>\n<div class=\"line number87 index86 alt2\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><\/div>\n<div class=\"line number88 index87 alt1\" style=\"color: #505050;\"><code class=\"js spaces\" style=\"font-weight: normal !important; font-style: normal !important;\">\u00a0\u00a0<\/code><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">});\u00a0<\/code><\/div>\n<div class=\"line number89 index88 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">}\u00a0<\/code><\/div>\n<div class=\"line number90 index89 alt1\" style=\"color: #505050;\"><\/div>\n<div class=\"line number91 index90 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">exports.login\u00a0=\u00a0login;\u00a0<\/code><\/div>\n<div class=\"line number92 index91 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">exports.start\u00a0=\u00a0start;\u00a0<\/code><\/div>\n<div class=\"line number93 index92 alt2\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">exports.upload\u00a0=\u00a0upload;<\/code><\/div>\n<div class=\"line number94 index93 alt1\" style=\"color: #505050;\"><code class=\"js plain\" style=\"font-weight: normal !important; font-style: normal !important; color: black !important;\">exports.show\u00a0=\u00a0show;<\/code><\/div>\n<p>&nbsp;<\/p>\n<p>\u8fd9\u4e9b\u6587\u4ef6\u5fc5\u987b\u653e\u5728node.js\u7684\u5b89\u88c5\u76ee\u5f55\u4e0b<br \/>\n\u4e0d\u8981\u5fd8\u8bb0\u5728C\u76d8\u521b\u5efa\u6587\u4ef6\u5939\uff1atmp\u3002<\/p>\n<p><a href=\"http:\/\/pan.baidu.com\/s\/1t7vps\" target=\"_blank\">http:\/\/pan.baidu.com\/s\/1t7vps<\/a><\/p>\n<p><a href=\"http:\/\/7915791.blog.51cto.com\/7905791\/1618962\" target=\"_blank\">http:\/\/7915791.blog.51cto.com\/7905791\/1618962<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u670d\u52a1\u5668\u4ee3\u7801\uff1aserver.js var\u00a0http\u00a0=\u00a0require(&#8220;http&#8221;);\u00a0 var\u00a0url\u00a0=\u00a0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,11],"tags":[],"class_list":["post-4480","post","type-post","status-publish","format-standard","hentry","category-nodejs","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/4480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4480"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/4480\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}