繁体   English   中英

路由器可以在localhost上运行,但不能在node.js的生产环境中

[英]router works on localhost but not in production in node.js

我正在使用express.js框架,路由器似乎可以在本地工作,但不能在生产环境中工作

router.route(`/server/template/:id`)
  .delete(test.delete)
  .get(temp.get);


router.route(`/server/template`)
  .post(test.post)
  .get(test.get);

我收到以下错误消息:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>

您需要使用Apache Web服务器在您自己的计算机或Internet上,或者在apache朋友,XAMPP或IIS中模拟HTML服务器。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM