mirror of
https://github.com/pavlobu/deskreen.git
synced 2025-05-16 15:30:20 -07:00
15 lines
287 B
TypeScript
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}`;
|
|
};
|