initial setup

This commit is contained in:
Jurgis Sakalauskas
2025-10-11 17:21:39 +03:00
commit ad2cf25bfd
37 changed files with 7084 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { config } from 'dotenv';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const rootDir = path.resolve(__dirname, '../../..');
config({ path: path.resolve(rootDir, '.env') });
const port = Number(process.env.SERVER_PORT ?? process.env.PORT ?? 3000);
export const env = {
port,
apiBasePath: process.env.API_BASE_PATH ?? '/api',
databaseUrl: process.env.DATABASE_URL ?? '',
appName: process.env.APP_NAME ?? 'BestChoice'
};