From 0d7706512cab7fa4a74b470a08a1ebdb1abae245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Sat, 1 Jun 2013 22:08:56 +0200 Subject: [PATCH] Started editing and adding real content. --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index f1f38d3..6f4b7ce 100644 --- a/server.js +++ b/server.js @@ -25,7 +25,7 @@ var express = require('express') var app = express(); -var database = new sqlite3.Database('game.db'); +var database = new sqlite.Database('game.db'); // Custom compile function for using nib alongside stylus function compile(str, path) { @@ -53,8 +53,8 @@ app.use(express.static(__dirname + '/public')); app.get('/', function (req, res) { var player_number = 0; - database.get("SELECT * FROM players", function (err, row) { - player_number = row.count; + database.get("SELECT COUNT(*) FROM players", function (err, row) { + player_number = row; }); res.render('index',