美文网首页
2018-08-30

2018-08-30

作者: vivizhu | 来源:发表于2018-08-30 18:05 被阅读0次

nodejs 学习第一天,学会在浏览器输出js。
// node.js学习
var http = require('http');
http.createServer(function (req, res) {
 // 发送 HTTP 头部
// HTTP 状态值: 200 : OK
// 内容类型: text/html
res.writeHead(200, {'Content-Type': 'text/html; charset=utf-8'});
// 发送响应数据 "Hello World"
res.write('node.js学习');
res.write('我正在用node 写程序~');
res.write('不知道怎么学习');
res.end('没有比较好的学习网站 请留个言');}
).listen(8080);
// 终端打印如下信息
console.log('Server running at http://127.0.0.1:8080/');

相关文章

  • 2018-09-01

    2018-08-30 明小萌 2018-08-30 22:02 · 字数 223 · 阅读 2 · 日记本 201...

  • 2018-09-05

    2018-08-30 c6_李晓红Dorothy 2018-08-30 07:44 · 字数 320 · 阅读 1...

  • hexo博客同时托管到github和coding

    title: 将hexo博客同时托管到github和codingdate: 2018-08-30 00:12:11...

  • 420期六项精进-日精进打卡

    420期六项精进-日精进打卡 雷PetTing 2018-08-30 22:44 · 字数 570 · 阅读 2 ...

  • 2018-08-31

    2018-08-31 万千工品金秀 2018-08-30 21:31 · 字数 542 · 阅读 2 · 日记本 ...

  • 2018-08-30

    2018-08-30 万千工品金秀 2018-08-29 21:16 · 字数 464 · 阅读 2 · 日记本 ...

  • 懂你 L4-U1-3-Vocabulary-Dental Pro

    流利说 D64 2018-08-30 一、复习 Level4-Unit1-Part3*Learning- List...

  • 所谓浪漫

    所谓浪漫 煎蛋品 2018-08-30 23:12 · 字数 355 · 阅读 0 · 失眠 几乎六年没见的小学同...

  • java.lang.IllegalStateException:

    2018-08-30 遇到的一点小问题将项目的targetSdkVersion升级为27,遇到了java.lang...

  • 日精打卡60

    日精打卡60 淡然笑_ce8e 2018-08-30 19:34 · 字数 336 · 阅读 1 · 日记本 淡然...

网友评论

      本文标题:2018-08-30

      本文链接:https://www.haomeiwen.com/subject/arpdwftx.html