From d7fc1299037365068db9815d59881855317daa90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8C=AF=E9=9C=87?= <865702942@qq.com> Date: Sat, 23 Apr 2016 12:46:47 +0800 Subject: [PATCH] config changed start bug fixed --- README.md | 2 ++ bin/_config.js | 1 + bin/start.js | 1 + src/config.js | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ad4266b..6428531 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ $ auth-center -h -v, --version output the version number $ auth-center init + $ auth-center start -h Usage: auth-center start [options] @@ -62,6 +63,7 @@ $ auth-center start -h --config custom config path --sync sync database to generate tables --data init data with json file + ``` #### 2. 采用引入方式执行 diff --git a/bin/_config.js b/bin/_config.js index b530620..4da69fb 100644 --- a/bin/_config.js +++ b/bin/_config.js @@ -1,6 +1,7 @@ 'use strict'; /*Redis*/const redisStore = require('koa-redis');/*Redis*/ module.exports = { + isTOTP: true, /*MySQL*/orm: { dialect: 'mysql', database: 'db_auth', diff --git a/bin/start.js b/bin/start.js index 13e78cd..7fcdb94 100644 --- a/bin/start.js +++ b/bin/start.js @@ -1,6 +1,7 @@ 'use strict'; const AuthServer = require('../app'); +const co = require('co'); const existsSync = require('fs').existsSync; module.exports = function(options) { diff --git a/src/config.js b/src/config.js index 5fd61d9..9ace750 100644 --- a/src/config.js +++ b/src/config.js @@ -22,7 +22,7 @@ const _config = { accessTokenTTL: 60 * 60, // ORM config orm: { - db: ':memory:', + database: ':memory:', dialect: 'sqlite', modelPath: join(__dirname, 'models') },