Skip to content

Commit

Permalink
add sequelize database port
Browse files Browse the repository at this point in the history
  • Loading branch information
bpodwinski committed Jan 8, 2023
1 parent 8e41d11 commit 14758f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class App {
public port: number;
public db_name: string;
public db_host: string;
public db_port: number;
public db_user: string;
public db_pass: string;
public redis_db: string | undefined;
Expand All @@ -28,6 +29,7 @@ export default class App {
port: number;
db_name: string;
db_host: string;
db_port: number;
db_user: string;
db_pass: string;
redis_db: string | undefined;
Expand All @@ -45,6 +47,7 @@ export default class App {
this.port = appInit.port;
this.db_name = appInit.db_name;
this.db_host = appInit.db_host;
this.db_port = appInit.db_port;
this.db_user = appInit.db_user;
this.db_pass = appInit.db_pass;
this.redis_db = appInit.redis_db;
Expand Down Expand Up @@ -95,6 +98,7 @@ export default class App {
const sequelize = new Sequelize({
database: this.db_name,
host: this.db_host,
port: this.db_port,
username: this.db_user,
password: this.db_pass,
dialect: "mysql",
Expand Down
1 change: 1 addition & 0 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const app: any = new App({
port: env.PORT,
db_name: env.DB_NAME,
db_host: env.DB_HOST,
db_port: env.DB_PORT,
db_user: env.DB_USER,
db_pass: env.DB_PASS,
redis_db: env.REDIS_DB,
Expand Down

0 comments on commit 14758f9

Please sign in to comment.