{"size": 483, "ext": "js", "max_stars_repo_path": "day01/js/08.server.js", "max_stars_repo_name": "Cai-ting99/phase3", "max_stars_repo_stars_event_min_datetime": "2019-12-25T08:36:26.000Z", "max_stars_repo_stars_event_max_datetime": "2019-12-25T08:36:26.000Z", "max_issues_repo_path": "day01/js/08.server.js", "max_issues_repo_name": "Cai-ting99/phase3", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "day01/js/08.server.js", "max_forks_repo_name": "Cai-ting99/phase3", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.9545454545, "max_line_length": 65, "alphanum_fraction": 0.6086956522}
//  需求：利用原生HTTP模块开启一个服务器

// 原生模块  不需要安装，直接就可以引用的模块
let http = require("http");

let app =http.createServer((req,res)=>{
    /*
        req: request  请求： 客户端发给服务端
        res: respnse  响应：  服务端发给客户端
    */ 
   res.writeHead(200,{"content-type":"text/html;charset=utf-8"});
   res.write("hello h5-1912");
   res.write("<h2>三阶段</h2>");
   res.end("结束");
})

app.listen(2019,()=>{
    // 监听端口号： 1-65536； 不用写太小，尽量1000以上，因为容易和系统端口号冲突
    console.log("服务器开启成功,http://localhost:2019");
})

