-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58c760e
commit 04dcfd2
Showing
14 changed files
with
58 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Overlay configuration to enable debuggers | ||
version: "3.9" | ||
version: "3" | ||
services: | ||
app: | ||
command: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
import dotenv from "dotenv"; | ||
|
||
/** | ||
* Load enviroment variables | ||
*/ | ||
dotenv.config(); | ||
dotenv.config({ path: `.env.local`, override: true }); | ||
|
||
export default function getConfig() { | ||
console.log(process.env); | ||
return { | ||
NODE_ENV: process.env.NODE_ENV, | ||
PORT: process.env.PORT, | ||
ALLOW_ORIGIN: process.env.ALLOW_ORIGIN, | ||
ALLOW_METHODS: process.env.ALLOW_METHODS, | ||
ALLOW_HEADERS: process.env.ALLOW_HEADERS, | ||
CONNECTION_STRING: process.env.CONNECTION_STRING, | ||
JWT_SECRET: process.env.JWT_SECRET, | ||
DB_HOST: process.env.DB_HOST, | ||
DB_PORT: process.env.DB_PORT, | ||
DB_PASSWORD: process.env.DB_PASSWORD, | ||
DB_USERNAME: process.env.DB_USERNAME, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { AppDataSource } from "../../config/db"; | ||
import { Article } from "./article-entity"; | ||
|
||
export const articleRepository = () => AppDataSource.getRepository(Article); | ||
export const getArticleRepository = () => AppDataSource.getRepository(Article); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { AppDataSource } from "../../config/db"; | ||
import { Comment } from "./comment-entity"; | ||
|
||
export const commentRepository = () => AppDataSource.getRepository(Comment); | ||
export const getCommentRepository = () => AppDataSource.getRepository(Comment); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { AppDataSource } from "../../config/db"; | ||
import { User } from "./user-entity"; | ||
|
||
export const userRepository = () => AppDataSource.getRepository(User); | ||
export const getUserRepository = () => AppDataSource.getRepository(User); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters