{"size": 726, "ext": "js", "max_stars_repo_path": "backends/express/config/index.js", "max_stars_repo_name": "kalburgimanjunath/FoodDelivery", "max_stars_repo_stars_event_min_datetime": "2019-12-26T12:56:42.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-27T14:33:20.000Z", "max_issues_repo_path": "backends/express/config/index.js", "max_issues_repo_name": "kalburgimanjunath/FoodDelivery", "max_issues_repo_issues_event_min_datetime": "2020-06-20T19:51:19.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T19:18:41.000Z", "max_forks_repo_path": "backends/express/config/index.js", "max_forks_repo_name": "kalburgimanjunath/FoodDelivery", "max_forks_repo_forks_event_min_datetime": "2020-02-26T06:02:20.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-17T19:06:43.000Z"}
{"max_stars_count": 92, "max_issues_count": 11, "max_forks_count": 54, "avg_line_length": 25.0344827586, "max_line_length": 80, "alphanum_fraction": 0.7148760331}
import dotenv from 'dotenv';
import path from 'path';

dotenv.config({});

let showStacktrace = true;

if ('SHOW_STACKTRACE' in process.env) {
	showStacktrace = process.env.SHOW_STACKTRACE;
}

const prodApiBaseUrl = 'https://api.food-delivery.mishast.com/';
const devApiBaseUrl = 'http://localhost:2000/';

const config = {
	env: process.env.NODE_ENV || 'development',
	server: {
		host: process.env.HOST || '0.0.0.0',
		port: process.env.PORT || 2000
	},
	mongoUrl: 'mongodb://localhost/foodDelivery',
	jwtSecret: process.env.JWT_SECRET || 'sdfsdfsdf',
	uploadDir: path.join(__dirname, '../upload'),
	showStacktrace,
	baseUrl: process.env.NODE_ENV === 'production' ? prodApiBaseUrl : devApiBaseUrl
};

export default config;
