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, () => {}); };