From f871e090b5d4f662d35c566b827380d884407e75 Mon Sep 17 00:00:00 2001 From: Bosn Date: Thu, 19 Apr 2018 10:51:00 +0800 Subject: [PATCH] fix migrate bug and fix cross-platform issue --- package.json | 3 +-- src/service/migrate.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5c89967..a0f2a3c 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dev": "cross-env NODE_ENV=development nodemon --watch scripts --watch dist dist/scripts/dev.js", "create-db": "cross-env NODE_ENV=development node dist/scripts/init", "tslint": "tslint -c tslint.json -p tsconfig.json", - "start": "cross-env NODE_ENV=production node dist/dispatch.js" + "start": "cross-env NODE_ENV=production pm2 start dist/dispatch.js --name=rap-server-delos" }, "author": "bosn, nuysoft", "license": "ISC", @@ -37,7 +37,6 @@ "koa-static": "^3.0.0", "lodash": "^4.17.5", "md5": "^2.2.1", - "md5is": "^2.0.2", "mockjs": "^1.0.1-beta3", "moment": "^2.17.1", "mysql": "^2.11.1", diff --git a/src/service/migrate.ts b/src/service/migrate.ts index bb2c6bc..b33ed0a 100644 --- a/src/service/migrate.ts +++ b/src/service/migrate.ts @@ -19,7 +19,7 @@ export default class Migrate { console.log(`load user ${user.id}`) if (!isMd5(user.password)) { user.password = md5(md5(user.password)) - user.save().then() + await user.save() console.log(`handle user ${user.id}`) } }