简体   繁体   中英

I get a 404 error whenever i try to get login page or signup page, after I did my second commit

At first, the problem was that I got a 404 error whenever I tried to submit/post the signup or login form, so a friend of mine told me to change a couple of things, but then after my second commit I now get 404 error whenever I try to get the Login or Sign Up Page

This is my whole project, on my Github.

https://github.com/tigerabrodi/blogcms

I'd highly appreciate if someone could take his time to have a look into this and help me to solve this problem.

I wanna be able to not just get the login or sign up page, but also to be able to post them and then save the user into the database.

I believe you simply forgot to include authRoutes (defined here ) using app.use(...) . This is why it gives you 404 - the routes such as GET /signup or GET /login are not defined.

So, the solution would be to add app.use(authRoutes) on this line below other routes you have defined previously.

Let me know if this works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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