Passport-discord

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 :slight_smile:
Eddie

1 Like

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

1 Like

how would i pass a variable when i render the file?

nvm, got it. Thank you

1 Like