create the web service by yourshelf

start cmd

node demo.js

var http = require('http');

http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('good night
');
}).listen(8888);

console.log('Server running at http://127.0.0.1:8888/');

http://nodejs.org/

原文地址:https://www.cnblogs.com/hellowzd/p/4190731.html