Skip to content
Advertisement

Tag: express

fetch() is spamming my API with thousands of requests

I have the following function which gets an image from my API: It did work, but now when I run the function it spams the API as the console gets flooded with “Fire” and my server gets thousands upon thousands of requests. Answer You named the function fetch so it overwrites (or shadows, depending on the scope your function is

How can i check a JWT token is valid using an async function route with nodejs?

I am following the guide below to verify that only registered users can send requests to my backend nodejs server, my frontend is sending requests with an authorization header that contains a token and that part is working well. The nodejs backend should then check the token is valid before sending a response: https://www.tonyvu.co/posts/jwt-authentication-node-js The example shows i should add

How to access POST data in express js?

Im using (in the browser): on the client side browser. I’m using (node js): to get the post data. but it doesn’t matter what I send it doesn’t show up. I don’t wanna have to install some separate “body parser” package to see the data…. I don’t wanna parse it. A post request is used to send data to the

Advertisement