Create initial bot framework (#7)
#1 Reviewed-on: https://gitea.vylpes.xyz/External/card-drop/pulls/7 Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
parent
cb548898ce
commit
c706737369
35 changed files with 5876 additions and 0 deletions
26
src/database/dataSources/appDataSource.ts
Normal file
26
src/database/dataSources/appDataSource.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { DataSource } from "typeorm";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const AppDataSource = new DataSource({
|
||||
type: "mysql",
|
||||
host: process.env.DB_HOST,
|
||||
port: Number(process.env.DB_PORT),
|
||||
username: process.env.DB_AUTH_USER,
|
||||
password: process.env.DB_AUTH_PASS,
|
||||
database: process.env.DB_NAME,
|
||||
synchronize: process.env.DB_SYNC == "true",
|
||||
logging: process.env.DB_LOGGING == "true",
|
||||
entities: [
|
||||
"dist/database/entities/**/*.js",
|
||||
],
|
||||
migrations: [
|
||||
"dist/database/migrations/**/*.js",
|
||||
],
|
||||
subscribers: [
|
||||
"dist/database/subscribers/**/*.js",
|
||||
],
|
||||
});
|
||||
|
||||
export default AppDataSource;
|
0
src/database/entities/.gitkeep
Normal file
0
src/database/entities/.gitkeep
Normal file
0
src/database/migrations/.gitkeep
Normal file
0
src/database/migrations/.gitkeep
Normal file
Loading…
Add table
Add a link
Reference in a new issue