fraudTech commited on
Commit
d89352c
·
1 Parent(s): 981475f

if (!JWT_SECRET)

Browse files
Files changed (1) hide show
  1. gateway.ts +5 -1
gateway.ts CHANGED
@@ -9,7 +9,11 @@ dotenv.config();
9
 
10
  const app = express();
11
  const PORT = parseInt(process.env.PORT || '7860', 10);
12
- const JWT_SECRET = process.env.JWT_SECRET || 'your-secret-key-change-this';
 
 
 
 
13
  const BACKEND_URL = process.env.BACKEND_URL || 'http://localhost:7860';
14
  const HF_TOKEN = process.env.HF_TOKEN || '';
15
  const BACKEND_API_SECRET = process.env.BACKEND_API_SECRET || '';
 
9
 
10
  const app = express();
11
  const PORT = parseInt(process.env.PORT || '7860', 10);
12
+ const JWT_SECRET = process.env.JWT_SECRET;
13
+ if (!JWT_SECRET) {
14
+ console.error('FATAL: JWT_SECRET environment variable is not set. Gateway cannot start.');
15
+ process.exit(1);
16
+ }
17
  const BACKEND_URL = process.env.BACKEND_URL || 'http://localhost:7860';
18
  const HF_TOKEN = process.env.HF_TOKEN || '';
19
  const BACKEND_API_SECRET = process.env.BACKEND_API_SECRET || '';