为什么在线上传时看不到我的 Web 应用主页?



我用入口文件index.js构建了一个 NodeJS 应用程序,它为我所有的静态文件(css、file、views(提供服务。当我上传我的应用程序以在线时,我看不到我的主页,而是主机网站或服务器显示一条消息,指出:you are seeing this page because you don't have index.html or index.php file in your public folder我有索引.js

<!--pixels game
> controllers
> css
> img
> js
> views 
index.js
package-lock.json
storage.json

.

创建一个包含索引的索引.html.js

<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="./index.js"></script>
<title>My Page</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
</body>
</html>

最新更新