Permalink
Browse files

Use console.log, not ancient node methods

  • Loading branch information...
1 parent 3f11f39 commit 37b33fc8514a16ae871674bce908b155ae1097e0 @felixge committed Apr 27, 2011
Showing with 7 additions and 7 deletions.
  1. +3 −3 example/post.js
  2. +4 −4 example/upload.js
View
6 example/post.js
@@ -24,11 +24,11 @@ server = http.createServer(function(req, res) {
res.end('error:\n\n'+util.inspect(err));
})
.on('field', function(field, value) {
- p([field, value]);
+ console.log(field, value);
fields.push([field, value]);
})
.on('end', function() {
- puts('-> post done');
+ console.log('-> post done');
res.writeHead(200, {'content-type': 'text/plain'});
res.end('received fields:\n\n '+util.inspect(fields));
});
@@ -40,4 +40,4 @@ server = http.createServer(function(req, res) {
});
server.listen(TEST_PORT);
-util.puts('listening on http://localhost:'+TEST_PORT+'/');
+console.log('listening on http://localhost:'+TEST_PORT+'/');
View
8 example/upload.js
@@ -23,15 +23,15 @@ server = http.createServer(function(req, res) {
form
.on('field', function(field, value) {
- p([field, value]);
+ console.log(field, value);
fields.push([field, value]);
})
.on('file', function(field, file) {
- p([field, file]);
+ console.log(field, file);
files.push([field, file]);
})
.on('end', function() {
- puts('-> upload done');
+ console.log('-> upload done');
res.writeHead(200, {'content-type': 'text/plain'});
res.write('received fields:\n\n '+util.inspect(fields));
res.write('\n\n');
@@ -45,4 +45,4 @@ server = http.createServer(function(req, res) {
});
server.listen(TEST_PORT);
-util.puts('listening on http://localhost:'+TEST_PORT+'/');
+console.log('listening on http://localhost:'+TEST_PORT+'/');

0 comments on commit 37b33fc

Please sign in to comment.