fixed
parent
c1638b9f56
commit
97413d2b9c
3
index.js
3
index.js
|
@ -13,12 +13,11 @@ import Ioredis from 'ioredis'
|
||||||
import Request from '@gm5/request'
|
import Request from '@gm5/request'
|
||||||
import Response from '@gm5/response'
|
import Response from '@gm5/response'
|
||||||
import Cookie from '@gm5/cookie'
|
import Cookie from '@gm5/cookie'
|
||||||
import Session from '@gm5/session'
|
// import Session from '@gm5/session'
|
||||||
|
|
||||||
import init from './lib/reg-init.js'
|
import init from './lib/reg-init.js'
|
||||||
import Log from './lib/log.js' //基础日志记录工具
|
import Log from './lib/log.js' //基础日志记录工具
|
||||||
|
|
||||||
|
|
||||||
import routerWare from './middleware/router.js'
|
import routerWare from './middleware/router.js'
|
||||||
import credentialsWare from './middleware/credentials.js'
|
import credentialsWare from './middleware/credentials.js'
|
||||||
// import cookieWare from './middleware/cookie.js'
|
// import cookieWare from './middleware/cookie.js'
|
||||||
|
|
|
@ -8,7 +8,7 @@ import fs from 'iofs'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
export default class Log {
|
export default class Log {
|
||||||
constructor(file = 'run_time.log', dir) {
|
constructor(file = 'run_time.log', dir = './') {
|
||||||
if (!dir) {
|
if (!dir) {
|
||||||
throw new Error(`agument dir must be a string, but ${typeof dir} given.`)
|
throw new Error(`agument dir must be a string, but ${typeof dir} given.`)
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
"crypto.js": "^2.0.1",
|
"crypto.js": "^2.0.1",
|
||||||
"es.shim": "^2.0.0",
|
"es.shim": "^2.0.0",
|
||||||
"iofs": "^2.0.0"
|
"iofs": "^2.0.0"
|
||||||
// "ioredis": "^3.2.2",
|
|
||||||
// "mysqli": "^3.0.11",
|
|
||||||
// "smartyx": "^1.3.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in New Issue