I'm creating a simple project using Node.JS and fs, I'm trying to make it detect if a file is existent and do something automatically if it detects that without breaking it.
I use express to redirect the URL to what I need it to do so if it loops again and again it will break it.
Is there some sort of simple way I can check again and again if something exists and if it does stop the loop and do something?
Comments
Post a Comment