Hello humans,
im currently using passport-discord
and im wondering how to show a users username in a html file. Server side it is req.user.username
but i dont know how to show that in an html file (:
Misly
Hello humans,
im currently using passport-discord
and im wondering how to show a users username in a html file. Server side it is req.user.username
but i dont know how to show that in an html file (:
Misly
Have you heard of ejs. It’s the best way to do this
Eddie
yes ive heard of it but never personally used it haha, how would i show the username in that?
You could use:
<%=req.user.username%>
As long as you have passed the req.user variable through when you render the ejs file. Best to watch a video on it
Eddie
how would i pass a variable when i render the file?
nvm, got it. Thank you