Skip to content

Tag: javascript

How to deal with a TokenExpiredError: jwt expired?

I have a project with NodeJS with jwt for managing user authentication. After a period of time, my app stops working and my server prints the following: Now, the person who was working in this project before me had this code for managing the tokens: My guess is that the issue is the expiresIn: ‘7d&#8217…

Image in span tag into an img tag

I try to display an image with <img src=”” alt=”music cover”> using <span></span> to display the music covers of my web radio. The link is dynamic, it’s why I want to use the span tag for getting the url link of the image’s shown during music playback. I&#…

How do I save the content after the onclick?

I already connected the html with js and I get the data from a form when the onclick is activated but since I save each data that I receive to use it later, how do I get the data out of the function without having problems: Answer You should create an external variable to save the data you want, when