-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
18 lines (16 loc) · 683 Bytes
/
config.js
File metadata and controls
18 lines (16 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Configuration for deployment
// This will automatically use the correct server URL based on where it's accessed from
window.APP_CONFIG = {
// Automatically detect and use the appropriate server URL
serverUrl: (() => {
const hostname = window.location.hostname;
const protocol = window.location.protocol;
// For localhost development
if (hostname === 'localhost' || hostname === '127.0.0.1') {
return 'http://localhost:3000';
}
// For production deployment - uses same host without port
// Traefik handles the routing to the backend
return `${protocol}//${hostname}`;
})()
};