decla-red/frontend/src/scripts/configuration.ts
Andras Schmelczer 93a7fe01ab
All checks were successful
Build & deploy / Build & deploy website (push) Successful in 32s
Build & deploy / Build & publish server image (push) Successful in 1m2s
Improve netcode and simplify (#4)
- Simplify the logic wherever possible to remove overengineering and simplify the netcode
- Actually improve the netcode
- The new lines are mainly the package locks and tests

Reviewed-on: https://home.schmelczer.dev/git/andras/decla-red/pulls/4
2026-09-15 07:57:57 +01:00

9 lines
353 B
TypeScript

const productionServers: Array<string> = ['https://declared.schmelczer.dev'];
const isDevelopment =
typeof location !== 'undefined' &&
(location.hostname === 'localhost' || location.hostname === '127.0.0.1');
export const servers: Array<string> = isDevelopment
? [`http://${location.hostname}:3000`, ...productionServers]
: productionServers;