code: function() {
      console.log("trying to create server 8080");
  
      http.createServer(function (req, res) { 
          try {
              var data = "";
              req.on('data', function(chunk){
                  data = data + chunk;
              });
              req.on('end', function(){
                  req.data = data;
                  if(req.url.indexOf("\.atom") != -1) {
                      req.url = req.url.replace(".atom","");
                      req.headers['Accept'] = "application/atom+xml";
                  }
  
                  serveFile(req, res);
              });
          } catch(e) {
              console.log("(!!) Error");
              console.log(e);
              res.withCORSHeader(500,{"Content-Type":"text/plain"});
              res.end();
          }
      }).listen(8080);
  
      console.log("public server running at "+8080);
  }
docs: HTTP server