Amend env file
This commit is contained in:
parent
c9b8aad459
commit
16d1e2c7ec
@ -1,3 +1,4 @@
|
|||||||
MY_SQL_USER=root
|
MY_SQL_USER=root
|
||||||
MY_SQL_PASSWORD=1234567890
|
MY_SQL_PASSWORD=1234567890
|
||||||
MY_SQL_DB=educa7ls
|
MY_SQL_DB=educa7ls
|
||||||
|
MY_SQL_PORT=3306
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
.env.production
|
.env.production
|
||||||
|
|
||||||
|
eegsac.zip
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
|
@ -9,13 +9,17 @@ import { PersonController } from "./controller/person/person.controller";
|
|||||||
import { PersonService } from "./controller/person/person.service";
|
import { PersonService } from "./controller/person/person.service";
|
||||||
import { SubjectController } from "./controller/subject/subject.controller";
|
import { SubjectController } from "./controller/subject/subject.controller";
|
||||||
import { SubjectService } from "./controller/subject/subject.service";
|
import { SubjectService } from "./controller/subject/subject.service";
|
||||||
|
import * as dotenv from "dotenv";
|
||||||
|
|
||||||
|
// Must be done before initializing DB.
|
||||||
|
dotenv.config();
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
TypeOrmModule.forRoot({
|
TypeOrmModule.forRoot({
|
||||||
type: "mysql",
|
type: "mysql",
|
||||||
host: "localhost",
|
host: "localhost",
|
||||||
port: 3306,
|
port: parseInt(process.env.MY_SQL_PORT ?? "3306", 10),
|
||||||
username: process.env.MY_SQL_USER,
|
username: process.env.MY_SQL_USER,
|
||||||
password: process.env.MY_SQL_PASSWORD,
|
password: process.env.MY_SQL_PASSWORD,
|
||||||
database: process.env.MY_SQL_DB,
|
database: process.env.MY_SQL_DB,
|
||||||
|
Loading…
Reference in New Issue
Block a user