美文网首页node.js跨坑技巧
关于nodejs+MongoDB实现注册登录的补充

关于nodejs+MongoDB实现注册登录的补充

作者: _踮起脚尖看世界 | 来源:发表于2019-06-10 16:05 被阅读0次

原作者链接:https://www.jianshu.com/p/b9a8a89f6c9f
由于文章内容没有页面部分的说明,导致运行后出现404错误,解决方法:
在public下增加页面部分

图片.png
login/index.html
<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title></title>
</head>
<body>
<form method="post">
  <div>
    name: <input type="text" id="name" name="name"/>
  </div>
  <div>
    pwd: <input type="text" id="pwd" name="pwd"/>
  </div>
  <div>
    mobile: <input type="text" id="mobile" name="mobile"/>
  </div>
  <input type="submit" value="提交"/>
</form>
</body>
</html>

register/index.html

<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title></title>
</head>
<body>
<form method="post">
  <div>
    name: <input type="text" id="name" name="name"/>
  </div>
  <div>
    pwd: <input type="text" id="pwd" name="pwd"/>
  </div>
  <div>
    mobile: <input type="text" id="mobile" name="mobile"/>
  </div>
  <button type="submit">提交</button>
</form>
</body>
</html>

GitHub地址:https://github.com/2019997204/nodejs-mongodb

相关文章

网友评论

    本文标题:关于nodejs+MongoDB实现注册登录的补充

    本文链接:https://www.haomeiwen.com/subject/hovzxctx.html