Started editing and adding real content.
This commit is contained in:
parent
82255af112
commit
200580a7da
1 changed files with 7 additions and 7 deletions
14
server.js
14
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',
|
||||
|
|
Loading…
Reference in a new issue