var server = require('./server')
var configRoute = require('./lib/route-config');
require('./lib/memory-leak');

var optimist = require('optimist');
var argv = optimist.usage('Usage: $0  --dbname [string] --port [num]').
    options('d', {
        alias: 'dbname',
        describe: 'database name'
    }).
    options('p', {
        alias: 'port',
        describe: 'port'
    }).
    default('p', 3001).
    default('d', 'ten20api')
    .argv;

server.startServer(argv.port, 'mongodb://localhost/' + argv.dbname, configRoute, function(err) {
    if (err) {
        console.log('server did not start ' + err);
    } else {
        console.log('server started on port ' + argv.port + ' dbname ' + argv.dbname);
    }

});
@@ -214,16 +214,35 @@
 num%5D').%0A
+    demand(%5B's'%5D).%0A
     opti
@@ -390,24 +390,118 @@
 rt'%0A    %7D).%0A
+    options('s', %7B%0A        alias: 'secret',%0A        describe: 'json web token secret'%0A    %7D).%0A
     default(

add secret parameter