httpserver.js 251 B

1234567
  1. var http = require('http');
  2. var server = http.createServer(function (request, response) {
  3. response.writeHead(200, {"Content-Type": "text/plain"});
  4. response.end("welcome to the machine!\n");
  5. });
  6. server.listen(8080);
  7. console.log("Server running!");