課程
/前端開發(fā)
/Node.js
/進擊Node.js基礎(chǔ)(一)
瀏覽器沒響應(yīng)
2017-04-24
源自:進擊Node.js基礎(chǔ)(一) 3-1
正在回答
var http = require('http');http.createServer(function(req, res){ ? //創(chuàng)建web服務(wù)器 ? ?res.writeHead(200, {'Content-Type':'text-plain'}); ? ?res.end('Hello Node.js\n');}).listen(1337, '127.0.0.1'); ? //通過 listen 在1337端口監(jiān)聽請求console.log('server running at http://127.0.0.1:1337/');
檢查下標點符號,要英文的
用 git bash打開就好了
單引號可能是用了中文的符號嗎?
舉報
本視頻教程帶你揭開Node.js的面紗,帶你走進一個全新世界
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-05-24
var http = require('http');
http.createServer(function(req, res){ ? //創(chuàng)建web服務(wù)器
? ?res.writeHead(200, {'Content-Type':'text-plain'});
? ?res.end('Hello Node.js\n');
}).listen(1337, '127.0.0.1'); ? //通過 listen 在1337端口監(jiān)聽請求
console.log('server running at http://127.0.0.1:1337/');
2017-05-02
檢查下標點符號,要英文的
2017-04-30
用 git bash打開就好了
2017-04-24
單引號可能是用了中文的符號嗎?