server.js
const http = require(‘http‘); http.createServer(function(req,res){ console.log(‘req come‘, req.url); res.end(‘123‘); }).listen(8888); console.log(‘server listening on 8888‘); console.log(‘http://localhost:8888/‘)
用node创建一个最简单的服务
原文地址:https://www.cnblogs.com/wzndkj/p/10030033.html
时间: 2024-10-15 11:52:22