2020-04-06 08:38:08 +02:00
|
|
|
const getWsHostName = () => process.env.JIRS_SERVER_BIND === "0.0.0.0" ? 'localhost' : process.env.JIRS_SERVER_BIND;
|
|
|
|
const getProtocol = () => window.location.protocol.replace(/^http/, 'ws');
|
2020-06-10 22:11:51 +02:00
|
|
|
const wsUrl = () => `${getProtocol()}//${getWsHostName()}:${process.env.JIRS_SERVER_PORT}/ws/`;
|
2020-04-06 08:38:08 +02:00
|
|
|
|
2020-05-19 11:55:55 +02:00
|
|
|
import("/jirs.js").then(async module => {
|
|
|
|
window.module = module;
|
|
|
|
await module.default();
|
2020-06-10 22:11:51 +02:00
|
|
|
const host_url = `${location.protocol}//${process.env.JIRS_SERVER_BIND}:${process.env.JIRS_SERVER_PORT}`;
|
2020-05-19 11:55:55 +02:00
|
|
|
module.render(host_url, wsUrl());
|
2020-03-30 08:16:26 +02:00
|
|
|
});
|
2020-08-10 16:45:30 +02:00
|
|
|
|