Retrying a request using 'request' library without extra modules
It's not "excessive" (your term) to use a pre-made module that does what you want. In fact, if it's solid code, then it's smart to use something that's already written and tested and maintained by someone else. There's little cost on a server to using a small module that does what you want.

I didn't do an exhaustive search, but I came across requestretry on NPM that seems to be pretty much what you might want (there are several other similar options on NPM too).  Using it, reduces your code to this:

const requestRetry = require('requestretry');

function checkUrl(url = 'http://localhost', retriesLeft = 0, timeoutMS = 3000) {
    return requestRetry({url: url, maxAttempts: retriesLeft + 1, retryDelay: timeoutMS});
}

checkUrl('http://www.example.com/', 3, 5000).then(data =&gt; {
    console.log(data);
}).catch(err =&gt; {
    console.log(err);
});


This particular library even has ways for you to plug in your own retry strategy or delay strategy (if, for example, you wanted to implement a back-off strategy to the retries so the retry interval gets longer after more failures which is sometimes desirable).