Skip to content
Advertisement

Node app wainting for localhost permantly

I’m new to node.js, im trying to make a simple login form, i have a database with the users and passwords, this is the action asigned to the form:

but when i press the submit button in the browser window it stays loading forever

Advertisement

Answer

You want to always return something to the client. In the case where the username or password is missing, you are not sending anything.

Also, it could happen that the database query never executes the callback because the connection was not made before the query. So check your connection and make sure it’s established before this query is made.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement