- 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
9 lines
353 B
TypeScript
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;
|