[Pkg-javascript-commits] [node-static] 63/151: Replacing sys.puts / error to console.log / error.
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Tue Jan 7 23:17:59 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository node-static.
commit af917a9d096de80f41b54e600c6c3811c42af8f5
Author: Pablo Cantero <pablo at pablocantero.com>
Date: Wed Jun 27 22:04:40 2012 -0300
Replacing sys.puts / error to console.log / error.
The "sys" module is now called "util" and it is not really necessary in this example.
---
examples/file-server.js | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/examples/file-server.js b/examples/file-server.js
index a12c43b..f133b80 100644
--- a/examples/file-server.js
+++ b/examples/file-server.js
@@ -1,4 +1,3 @@
-var sys = require('sys');
var static = require('../lib/node-static');
//
@@ -13,14 +12,14 @@ require('http').createServer(function (request, response) {
//
file.serve(request, response, function (err, res) {
if (err) { // An error as occured
- sys.error("> Error serving " + request.url + " - " + err.message);
+ console.error("> Error serving " + request.url + " - " + err.message);
response.writeHead(err.status, err.headers);
response.end();
} else { // The file was served successfully
- sys.puts("> " + request.url + " - " + res.message);
+ console.log("> " + request.url + " - " + res.message);
}
});
});
}).listen(8080);
-sys.puts("> node-static is listening on http://127.0.0.1:8080");
+console.log("> node-static is listening on http://127.0.0.1:8080");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git
More information about the Pkg-javascript-commits
mailing list