Node.js
来源:互联网 发布:c语言中各类数据 编辑:程序博客网 时间:2024/06/06 00:28
const http = require('http');//建立http请求const hostname = '127.0.0.1';const port = 3000;//req:请求内容;res:响应内容const server = http.createServer((req, res) => {//创建一个web服务器 res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World\n');});server.listen(port, hostname, () => {//服务器在3000端口监听请求 console.log(`Server running at http://${hostname}:${port}/`);});
阅读全文
0 0
- js node
- Node.JS:
- node js
- node.js
- node.js
- node.js
- Node.js
- node.js
- Node.js
- Node.Js
- node js
- Node.js
- node.js
- node.js
- node.js
- node.js
- node.js
- node.js
- NEXT主题:使用”多说“给博客的文章添加评论功能
- APK的重新签名与获取Root权限
- 堆栈的总结
- 数据结构 插入排序的坑以及思想纠正
- NOIP2015提高组T2 子串
- Node.js
- python mysql问题汇总
- Struts2 官方教程:编写拦截器
- 1041: 最大或 [思维]
- Vue源码解析(四)
- 遇到的HTTP错误 403.14-Forbidden解决办法
- spring+springMVC+Mybatis下的logback日志
- 中国微生物组计划—农作物微生物组:跨越转化临界点的现代生物技术
- UEditor前端配置项说明