Skip to content

Commit

Permalink
Merge pull request #58 from perttuvaarala/azuree
Browse files Browse the repository at this point in the history
port to config
  • Loading branch information
perttuvaarala authored Oct 12, 2023
2 parents 2bf86c9 + 66110ee commit 7d4d3e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ const startServer = async () => {
}}
));

httpServer.listen({ port: 3000 }, () =>
console.log(`🚀 Server ready at port 3000`),
httpServer.listen({ port: config.PORT }, () =>
console.log(`🚀 Server ready at port ${config.PORT}`),
);
};

Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ const parseEnv = <T extends string>(keys: T[]) => {
return Object.fromEntries(entries) as Record<T, string>;
};

export const config = parseEnv([
export const config={... parseEnv([
"DATABASE_URL",
"GOOGLE_CLIENT_ID",
"GOOGLE_CLIENT_SECRET",
"GOOGLE_CALLBACK_URL",
"APP_URL",
"SESSION_SECRET",
"SESSION_COOKIE_NAME",
]);
]), PORT: process.env.PORT || "3000"};

0 comments on commit 7d4d3e2

Please sign in to comment.