创建一个最简单的服务

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创建一个最简单的服务 

posted @ 2018-11-28 06:53  wzndkj  阅读(205)  评论(0编辑  收藏  举报