openvidu-server: main index.html at "/"

pull/437/head
pabloFuente 2020-04-17 13:08:38 +02:00
parent d078a322b8
commit 0b26883eb1
2 changed files with 29 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/target/
*.factorypath
/src/main/resources/static/
/src/main/resources/static/dashboard/

View File

@ -0,0 +1,28 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>OpenVidu</title>
</head>
<body>
<h1>Welcome to OpenVidu</h1>
<ul>
<li><strong>OpenVidu Server URL: </strong><span id="rest-api-url"></span>
<small>(consume <a
href="https://docs.openvidu.io/en/stable/reference-docs/REST-API/"
target="_blank">REST API</a> in this URL)
</small></li>
<li><strong>OpenVidu Dashboard: </strong><span id="dashboard-url"></span></li>
</ul>
</body>
<script>
window.onload = function() {
var restApiUrl = window.location.origin.replace(/\/$/, "");
var dashboardUrl = window.location.origin.replace(/\/$/, "")
+ "/dashboard";
document.getElementById("rest-api-url").innerHTML = restApiUrl;
document.getElementById("dashboard-url").innerHTML = "<a href='"+ dashboardUrl + "' target='_blank'>"
+ dashboardUrl + "</a>";
}
</script>
</html>