I use a module which make only a request to a http service. In this module I have a variable with a date since the last request. After the module is "done" also the variable will get lost. But I want to save the date in that variable since the last request.
something like that:
moduleA.js:
var lastModifiedSince = null;
...
//request goes here
...
//if request was successfull
lastModifiedSince = new Date();
So but the next time I do a request the script starts new and lastModifiedSince will be null at the first time.
It's ok to be null if the server have to be restarted but I want to keep the date until the server is alive not only as long as the module is working. So what would be best practice to solve this?