📜  键入 orm 数据库连接 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:17.103000             🧑  作者: Mango

代码示例1
import {createConnection, Connection} from "typeorm";

const connection: Connection = await createConnection({
    type: "mysql",
    host: "localhost",
    port: 3306,
    username: "test",
    password: "test",
    database: "test",
    entities: ["entity/*.js"]
});