From c40b9490de97a150904a1596e84a2c972f0b386d Mon Sep 17 00:00:00 2001 From: Changehee Choi Date: Fri, 7 Aug 2020 17:45:58 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20ormconfig=20username/password=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/ormconfig.json | 4 ++-- server/src/index.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/server/ormconfig.json b/server/ormconfig.json index 506073d..19a4fdc 100644 --- a/server/ormconfig.json +++ b/server/ormconfig.json @@ -2,8 +2,8 @@ "type": "mysql", "host": "localhost", "port": 3306, - "username": "root", - "password": "root", + "username": "relay11", + "password": "123123", "database": "relay11db", "synchronize": true, "logging": true, diff --git a/server/src/index.ts b/server/src/index.ts index c0d98ba..e173b82 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -5,9 +5,8 @@ import { createConnection } from "typeorm"; const main = async function () { const app = new Koa(); // const router = new Router(); - const connection = createConnection().then(() => { - console.log("connected"); - }); + const connection = await createConnection(); + console.log('Database connection successfully.'); app.listen(8080, () => {}); };