Parameters
-
dbConfig: {
database: string;
host: string;
password: string;
port: number;
schema: string;
ssl: {
ca: string;
cert: string;
enabled: true;
key: string;
} | {
ca?: string;
cert?: string;
enabled: false;
key?: string;
};
username: string;
}
-
database: string
-
host: string
-
password: string
-
port: number
-
schema: string
-
ssl: {
ca: string;
cert: string;
enabled: true;
key: string;
} | {
ca?: string;
cert?: string;
enabled: false;
key?: string;
}
-
username: string
Returns DataSourceOptions
Options object ready to use with typeorm.
A helper function that creates the typeorm DataSource options to use for creating a new DataSource. Handles SSL and registration of all required entities and migrations.