Skip to content

Commit ce16398

Browse files
committed
Fixup some nits in node server.
1 parent b24db60 commit ce16398

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ app.get('/comments.json', function(req, res) {
2929

3030
app.post('/comments.json', function(req, res) {
3131
fs.readFile('_comments.json', function(err, data) {
32-
var tempComments = JSON.parse(data);
33-
tempComments.push(req.body);
34-
fs.writeFile('_comments.json', JSON.stringify(tempComments), function(err) {
32+
var comments = JSON.parse(data);
33+
comments.push(req.body);
34+
fs.writeFile('_comments.json', JSON.stringify(comments), function(err) {
3535
res.setHeader('Content-Type', 'application/json');
36-
res.send(JSON.stringify(tempComments));
36+
res.send(JSON.stringify(comments));
3737
});
3838
});
3939
});

0 commit comments

Comments
 (0)