Skip to content

Commit

Permalink
changes in env var
Browse files Browse the repository at this point in the history
Signed-off-by: Tanmay Vaij <tanmayvaij22@gmail.com>
  • Loading branch information
tanmayvaij committed Jul 3, 2024
1 parent 51e06f6 commit 093ce77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/database/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { connect } from "mongoose";

export const connectToDatabase = async () => {
try {
await connect(process.env.MONGO_URI as string);
await connect(
`${process.env.UAUTHX_PUBLIC_IP}:${process.env.MONGODB_EXPOSE_PORT}/${process.env.MONGODB_NAME}`
);
console.log("connected to database successfully");
} catch (error) {
console.log(error);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/checkEnvVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { shutdownServer } from "./shutdownServer";
const requiredEnvVariables = [
"UAUTHX_ADMIN",
"UAUTHX_PASSWORD",
"MONGO_URI",
"UAUTHX_PUBLIC_IP",
"SECRET_KEY",
];

Expand Down

0 comments on commit 093ce77

Please sign in to comment.