diff --git a/dbconfig.js b/dbconfig.js index 07428d5..c56ced2 100644 --- a/dbconfig.js +++ b/dbconfig.js @@ -56,4 +56,19 @@ function prepare_db() { }); } -prepare_db(); + +function createDB() { + 'use strict'; + exec('createdb oBrand', function(err) { + if (err !== null) { + console.log('exec error: ' + err); + return -1; + } else { + prepare_db(); + + } + }); +} + + +createDB();