Answer the question
In order to leave comments, you need to log in
How to correctly organize the trial period of the application?
Good day to all.
I am planning a trial period for processing incoming data in a Node.JS application.
Essentially, the user registers. Then, in your personal account, you can add a list of mobile devices, with a cat. requests will be processed. The thought came to mind when in b.d. all information about the device is recorded, add a field to the cat. the lock date will be stored. Those. today's date + 3 days. Now, with each request, it will check if this date has come, if so, offer to extend the maintenance period.
Hence the question: How can I get such a date?
Perhaps my logic is ridiculous and I would consider any suggestions.
Answer the question
In order to leave comments, you need to log in
It is better to make the trial period eternal, but with limited functionality.
I think it will be easier to write the date + 3 days and check today's date with the date in the database
. How to get the date?
let date = new Date();
date.setDate(date.getDate() + 3);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question