Genesis
This commit is contained in:
17
src/config/env.js
Normal file
17
src/config/env.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import dotenv from 'dotenv';
|
||||
import { dirname, resolve } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
dotenv.config({ path: resolve(__dirname, '../../.env') });
|
||||
|
||||
export default {
|
||||
port: Number(process.env.PORT) || 4208,
|
||||
corsOrigins: (process.env.CORS_ORIGINS || 'http://localhost:5173')
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean),
|
||||
googleClientId: process.env.GOOGLE_CLIENT_ID,
|
||||
jwtSecret: process.env.JWT_SECRET || 'fallback_secret_please_change_in_production',
|
||||
sqlitePath: process.env.SQLITE_PATH,
|
||||
};
|
||||
Reference in New Issue
Block a user