hello world

第一天學習node.js,比較菜鳥就隨便記錄下node

首先安裝問node以後打開命令行工具,輸入node console.log(111111);  輸出111111表示已經安裝成功了.瀏覽器

創建一個http服務器:服務器

var http = require("http");工具

http.createServer(function(request, response) {
console.log(111111111111111111);
}).listen(8888);學習

新建js文件將其保存爲helloworld.jsui

首先在cmd中運行cd node的安裝目錄,而後在瀏覽器中輸入localhost:8888  命令行

將會顯示111111111111111111   好了 ,明天6點起來,晚安cmd

相關文章
相關標籤/搜索