Skip to content

Commit 37b33fc

Browse files
committed
Use console.log, not ancient node methods
1 parent 3f11f39 commit 37b33fc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

example/post.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ server = http.createServer(function(req, res) {
2424
res.end('error:\n\n'+util.inspect(err));
2525
})
2626
.on('field', function(field, value) {
27-
p([field, value]);
27+
console.log(field, value);
2828
fields.push([field, value]);
2929
})
3030
.on('end', function() {
31-
puts('-> post done');
31+
console.log('-> post done');
3232
res.writeHead(200, {'content-type': 'text/plain'});
3333
res.end('received fields:\n\n '+util.inspect(fields));
3434
});
@@ -40,4 +40,4 @@ server = http.createServer(function(req, res) {
4040
});
4141
server.listen(TEST_PORT);
4242

43-
util.puts('listening on http://localhost:'+TEST_PORT+'/');
43+
console.log('listening on http://localhost:'+TEST_PORT+'/');

example/upload.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ server = http.createServer(function(req, res) {
2323

2424
form
2525
.on('field', function(field, value) {
26-
p([field, value]);
26+
console.log(field, value);
2727
fields.push([field, value]);
2828
})
2929
.on('file', function(field, file) {
30-
p([field, file]);
30+
console.log(field, file);
3131
files.push([field, file]);
3232
})
3333
.on('end', function() {
34-
puts('-> upload done');
34+
console.log('-> upload done');
3535
res.writeHead(200, {'content-type': 'text/plain'});
3636
res.write('received fields:\n\n '+util.inspect(fields));
3737
res.write('\n\n');
@@ -45,4 +45,4 @@ server = http.createServer(function(req, res) {
4545
});
4646
server.listen(TEST_PORT);
4747

48-
util.puts('listening on http://localhost:'+TEST_PORT+'/');
48+
console.log('listening on http://localhost:'+TEST_PORT+'/');

0 commit comments

Comments
 (0)