Skip to content

Commit cdad6af

Browse files
committed
1 parent 7201203 commit cdad6af

File tree

1 file changed

+2
-1
lines changed
  • packages/auth-services/src/login-server/src

1 file changed

+2
-1
lines changed

packages/auth-services/src/login-server/src/app.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import express, { Express } from 'express';
22
import cors from 'cors';
33
import { OAuth2Client } from 'google-auth-library';
44
import path from 'node:path';
5+
import { fileURLToPath } from 'node:url';
56
// Prefer Node's CJS globals when available; fallback to process.cwd()
6-
const resolvedDirname = typeof __dirname !== 'undefined' ? __dirname : process.cwd();
7+
const resolvedDirname = path.dirname(fileURLToPath(import.meta.url));
78

89
type DiscordTokenResponse = {
910
access_token?: string;

0 commit comments

Comments
 (0)