Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境。
node.js是单线程,非阻塞i/o
09年诞生,从0.x.x开始
用node创建服务器
// 引包
const http = require('http');
// 创建服务器
const proxy = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('响应内容');
});
// 监听
proxy.listen(1337, '127.0.0.1')