diff options
| author | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-27 14:04:50 +0000 |
|---|---|---|
| committer | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-27 14:04:50 +0000 |
| commit | 95d1c4e58796ea481e58a5d3c559c147b5b9b921 (patch) | |
| tree | 179618f56f6960dba0db52b34354d6b5cccb8789 /bin/www.js | |
| parent | d12fecf3453a7a362150bb5a87e152fade6f6976 (diff) | |
impvroved db permormance significantly on heavy usage
Diffstat (limited to 'bin/www.js')
| -rw-r--r-- | bin/www.js | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,4 +1,4 @@ - +var dbFile = require('../node_simple'); var app = require('../app'); var http = require('http'); @@ -7,7 +7,15 @@ var server = http.createServer(app); var port = '3000'; app.set('port', port); -server.listen(port, function(){ - console.log('listening on port 3000'); +dbFile.setupDB(function (success, mssg) { + if (success) { // db establiseh + server.listen(port, function(){ // now accept connections + console.log('listening on port 3000'); + }); + } + else { + console.log(mssg); + } }); + |
