ExpressJS router not working
Login.js
server.js
All varaibles are defined and server is up on port 3000. If I remove it from routes and use app.post() instead of using a route, it works just fine
I think whats going on is that the route is never registered
the file exists in the path specified
1 Reply
Nevermind, fixed
Since i'm attaching the router to "/api/login", I need to change the path the router is on in login.js from
router.post("/api/login"
to
router.post("/"