如果不重新启动服务器,投放的HTML表不会更改内容

时间:2018-10-22 04:22:22

标签: javascript html node.js mongodb express

我遇到这个问题已有一段时间了,一直在寻找答案,可惜我还没有找到答案。所以,我自己问问题。

问题是这样的: website pre update

在我的数据库中,我只有一个未标记为完成的游戏。刷新时应该在网页上更新哪个,但不是。我不太了解为什么会这样,因为我对Web开发还很陌生。谢谢您能给我的任何帮助。如果您需要更多信息,请随时询问。

原始页代码

<title>CoinFlip</title>
<style>table, th, td {border: 1px solid black;border-collapse: collapse;}th, td {padding: 15px;}</style>
<table>
<tr>
<th>Game Title</th>
<th>Buyin</th>
<th>return</th>
<th>finished</th>
<th>User1</th>
<th>User2</th>
<th>User1 Choice</th>
<th>Join</th>
</tr>
{coinflip_table_data}
</table>
<h2>Logged in as {name}</h2><h1><a href="/logout">Logout</a></h2>

用于编辑页面内容的代码 enter image description here

用于发送页面内容的代码 code used to send the page content

数据库内容的图片

Database content

再次感谢您的帮助! :D

1 个答案:

答案 0 :(得分:0)

问题是我正在编辑源文件,但没有复制它,而是发送了复制的版本。因此,当我尝试发送更新的数据时,文件从未有任何占位符被替换。