Hello, hope you'll are good. Today we'll do the second part of our fullstack e-com website series. In this part, you'll make a node server to run w...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
Take it from somebody whos job it is to login an register and design user flows, I would recommend that you don't try to handle your own security or store users etc, get an IDP, even a free one like keycloak and use that. Your wallet / mind will thank you.
What is idp
en.m.wikipedia.org/wiki/Identity_p...
something I did not like generating the token. and this is a critical moment.
if you plan to implement a real project with such an architecture, it is appropriate to consider working with JWT instead of using the current implementation.
Yeah I agree.I was just experimenting with token validation. Of course JWT is far or is the best solution for authentication☺️
Hello - After following your 1st video tutorial, the 2nd part gives me error in npm start -
Kindly let me know.
Hey, make sure in your package.json file you have "start" : "nodemon server.js" then it should run.
Hello!
The Node.js thing does not work. Is there a way to implement it in Windows at all?
Or, more directly: I need a webshop with mysqli database. I am not familiar with what you use here. Is there a way to use your code directly with a "normal" database?
Thank you!
To be more concrete:
You write at the start of this part "Start with server, open the previous code folder in terminal or cmd prompt."
I don't understand that at all. What is "the previous code folder"? How can I open a whole folder in Terminal? How should I "start with server"? What server? Etc.
It seems that there is quite some important information missing.
It works now, at least locally. I still don't know how I get this online, but I will persist.
I hope I get it working! It's great that you offer this, thank you!
All codes are same, I wrote the blog in exact same order as the video. The only thing is, video it was line by line, and because of blog, I making it element by element, all the codes are same and you can follow any one.
and a little more criticism :) nowhere do you handle callback errors. this is a very bad practice.
be sure to check for an error first and only then continue processing the task. also, you can add another class of messages (besides alert) for example error to return in case of error
Thanks to pointing out the mistakes I'll make sure to handle error first.☺️
Keep it up :)
// send data function
const sendData = (path, data) => {
fetch(path, {
method: 'post',
headers: new Headers({'Content-Type': 'application/json'}),
body: JSON.stringify(data)
}).then((res) => res.json()) //error in this line
.then(response => {
processData(response);
})
error-Uncaught (in promise) SyntaxError: Unexpected end of JSON input
at form.js:62:26
getting this error on the login page while the email and password is correct.
form.js:82 Uncaught (in promise) ReferenceError: generateToken is not defined
at processData (form.js:82:5)
at form.js:72:9
Excelente! Muy buen post, eres muy hábil en el desarrollo web. Thanks for share your job.
Beautiful thanks
What is a 500 Internal Server Error? and how can solve this issues.
Kala jadu specialist
Hello how can i link bootstrap in html
can u please tell me how to solve this problem login page while the email and password is correct.