mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
feat: unlock changing port in UI (#476)
* 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>
This commit is contained in:
@@ -131,7 +131,7 @@ export const initAssets = async () => {
|
||||
export const startServer = async () => {
|
||||
checkStart(OntimeStartOrder.InitServer);
|
||||
|
||||
const serverPort = 4001; // hardcoded for now
|
||||
const { serverPort } = DataProvider.getSettings();
|
||||
const returnMessage = `Ontime is listening on port ${serverPort}`;
|
||||
|
||||
expressServer = http.createServer(app);
|
||||
@@ -144,7 +144,7 @@ export const startServer = async () => {
|
||||
|
||||
expressServer.listen(serverPort, '0.0.0.0');
|
||||
|
||||
return returnMessage;
|
||||
return { message: returnMessage, serverPort };
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user