Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
-
JordMan2127y@rootshell but this only teach me how to use SQL in the node.js, which I basically know... I'm trying to understand how to build users system, everything I found online was crappy...
Is it the same like creating users system in php? -
for-Each5357y@JordMan Most back end api calls follow the same principle
If success return status code
Else
Return status code etc etc
More or less the same for any language -
JordMan2127y@rootshell @forE ok, I tried to do something but there's a few things I don't understand... How to know that form was submitted? How to make it run several web pages?
-
for-Each5357y@JordMan So form submitted: You pass the route as a parameter form the form, with a post request
The route should reflect this:
Router.post(‘url route goes here etc’)
Inside the route you validate the form before submitting it, input fields etc
If the form submission was successful your return a status code;
Using a REST client like POSTMAN or insomnia you can submit the data in the form of JSON to the route and if works the success status code will be returned if it wasn’t you’ll get a different one -
for-Each5357y@JordMan if you’ve got the code on github I’ll have a gander for you when I’ve got some free time, however I would try to keep questions like this on SO or the discord channel I guess
Related Rants
Any good tutorials to build a simple users system with node.js and MySQL db? I just started node.js and I can't find anything good....
question
mysql
node.js
users system