Amend env file

master
Fernando 2023-05-09 12:27:37 -05:00
parent c9b8aad459
commit 16d1e2c7ec
3 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,4 @@
MY_SQL_USER=root
MY_SQL_PASSWORD=1234567890
MY_SQL_DB=educa7ls
MY_SQL_PORT=3306

2
.gitignore vendored
View File

@ -6,6 +6,8 @@
.env.production
eegsac.zip
# Logs
logs
*.log

View File

@ -9,13 +9,17 @@ import { PersonController } from "./controller/person/person.controller";
import { PersonService } from "./controller/person/person.service";
import { SubjectController } from "./controller/subject/subject.controller";
import { SubjectService } from "./controller/subject/subject.service";
import * as dotenv from "dotenv";
// Must be done before initializing DB.
dotenv.config();
@Module({
imports: [
TypeOrmModule.forRoot({
type: "mysql",
host: "localhost",
port: 3306,
port: parseInt(process.env.MY_SQL_PORT ?? "3306", 10),
username: process.env.MY_SQL_USER,
password: process.env.MY_SQL_PASSWORD,
database: process.env.MY_SQL_DB,