javascript - express routing problem
过去多啦不再A梦
过去多啦不再A梦 2017-05-19 10:40:21
0
2
431

First determine whether there is a cookie, if not, render login_index
There is a form in login_index to submit a post request api/user/login,
Click the submit button, why can't the route be routed to app.use('api' ,xxx)? Through console.log, we know that the content in the if in else is indeed executed

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
大家讲道理

滿天的星座

You must use app.use吗?
正常来写app.use('/api')应该写在这个中间件的下面,然后这里应该写res.redirect to jump here

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template