1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-05-16 15:30:20 -07:00
deskreen/app/api/urlGenerator.ts
Pavlo Buidenkov b925803d9f better client UI code
huge work done on sharing desktop session
2020-11-22 17:07:01 +02:00

15 lines
287 B
TypeScript

/* istanbul ignore file */
import config from './config';
export default (resourceName = '') => {
const { port, protocol, host } = config;
const resourcePath = resourceName;
if (!host) {
return `/localhost`;
}
return `${protocol}://${host}:${port}/${resourcePath}`;
};