From 200580a7da4cbeb5c7be3de7f586d52d051682ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Sat, 1 Jun 2013 23:59:33 +0200 Subject: [PATCH] Started editing and adding real content. --- server.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server.js b/server.js index 9512e67..35aced1 100644 --- a/server.js +++ b/server.js @@ -58,14 +58,7 @@ app.get('/', function (req, res) { console.log('Serializing'); database.serialize(function() { - database.get("SELECT COUNT(*) FROM players", function (err, row) { - player_number = row; - }); - database.get("SELECT COUNT(*) FROM stats", function (err, row) { - stats_number = row; - }); console.log('Querying players'); - database.each("SELECT * FROM players", function(err, row) { console.log('Received a player row! Weheeeee!'); var nextElement = players.length; @@ -73,6 +66,13 @@ app.get('/', function (req, res) { console.log(players); }); + database.get("SELECT COUNT(*) FROM players", function (err, row) { + player_number = row; + }); + database.get("SELECT COUNT(*) FROM stats", function (err, row) { + stats_number = row; + }); + res.render('index', { title: 'My Game',