Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
293 views
in Technique[技术] by (71.8m points)

javascript - NodeJS after sending request and set interval to repeat the function, I update my code source, but the code source response for my code not updating

I am sending a request with Node.js to get code source of a website and setting interval of 5 seconds, and then I am changing my code source in my server, but the code still getting the old code source, it's not updating, here is the code

const request = require('request');
setInterval(() => {
        request('https://example.com/', function (error, response, body) {
            console.log(body);
    });
}, 5000);

after I change something in my source code, the console not updating

question from:https://stackoverflow.com/questions/65879605/nodejs-after-sending-request-and-set-interval-to-repeat-the-function-i-update-m

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...