添加一个单独的 index.html 作为主页并将 shinyapp 路由到其他页面
Adding a separate index.html as homepage and routing shinyapp to some other page
我在 R 中制作了一个闪亮的应用程序并使用 shiny-server 通过网络托管它。假设我的应用程序托管在 www.test.in (just for instance). Now I want to add a simple static HTML page which will contain the link of the app so when the user will visit the URL www.test.in, he will see the HTML page and www.test.in/app 将包含闪亮的应用程序。
提前致谢。
您可以在 /srv/shiny-server
中添加以下 index.html
文件:
index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Refresh" content="0; url=//www.test.in:port/app/" />
</head>
<body>
<p>Redirecting to <a href="//www.test.in:port/app/">app</a>.</p>
</body>
</html>
其中 port
应设置为正确的值,例如 3838。
Shiny Server 将打开此索引并重定向到应用程序。
我在 R 中制作了一个闪亮的应用程序并使用 shiny-server 通过网络托管它。假设我的应用程序托管在 www.test.in (just for instance). Now I want to add a simple static HTML page which will contain the link of the app so when the user will visit the URL www.test.in, he will see the HTML page and www.test.in/app 将包含闪亮的应用程序。
提前致谢。
您可以在 /srv/shiny-server
中添加以下 index.html
文件:
index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Refresh" content="0; url=//www.test.in:port/app/" />
</head>
<body>
<p>Redirecting to <a href="//www.test.in:port/app/">app</a>.</p>
</body>
</html>
其中 port
应设置为正确的值,例如 3838。
Shiny Server 将打开此索引并重定向到应用程序。