mirror of
https://github.com/sakaljurgis/best-choice.git
synced 2026-07-08 21:47:40 +00:00
initial setup
This commit is contained in:
@@ -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'
|
||||
};
|
||||
Reference in New Issue
Block a user