mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-05 15:33:59 +00:00
1d4dc3a26f
* refactor: unlock changing port in UI * Change server port (#464) * Ability to save custom port * Launch server on custom port & pass that port to electron * Add serverPort validation * Prevent changing port in docker --------- Co-authored-by: Snehanshu Phukon <snehanshu@mamboemm.com> --------- Co-authored-by: স্নেহাংশু ফুকন <hello@snehanshu.com> Co-authored-by: Snehanshu Phukon <snehanshu@mamboemm.com>
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
// REST stuff
|
|
export const EVENT_DATA = ['eventdata'];
|
|
export const ALIASES = ['aliases'];
|
|
export const USERFIELDS = ['userFields'];
|
|
export const RUNDOWN_TABLE_KEY = 'rundown';
|
|
export const RUNDOWN_TABLE = [RUNDOWN_TABLE_KEY];
|
|
export const APP_INFO = ['appinfo'];
|
|
export const OSC_SETTINGS = ['oscSettings'];
|
|
export const APP_SETTINGS = ['appSettings'];
|
|
export const VIEW_SETTINGS = ['viewSettings'];
|
|
export const RUNTIME = ['runtimeStore'];
|
|
|
|
const location = window.location;
|
|
const socketProtocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
|
|
|
const STATIC_PORT = 4001;
|
|
export const serverPort = import.meta.env.DEV ? STATIC_PORT : location.port;
|
|
export const serverURL = `${location.protocol}//${location.hostname}:${serverPort}`;
|
|
export const websocketUrl = `${socketProtocol}://${location.hostname}:${serverPort}/ws`;
|
|
|
|
export const eventURL = `${serverURL}/eventdata`;
|
|
export const rundownURL = `${serverURL}/events`;
|
|
export const ontimeURL = `${serverURL}/ontime`;
|
|
|
|
export const stylesPath = 'external/styles/override.css';
|
|
export const overrideStylesURL = `${serverURL}/${stylesPath}`;
|