'How to track free trial in programming? [closed]
I have an application that users can use it 14 days without paying. However, after 14 days users will not be able to use the application unless s/he pays for it.
I don't know how to track the remaining time for the free trial. I'm thinking of setting an cronjob 14 days later when the users is created but I think it is a bit hard to manage (?).
The second thought would be checking the remaining time for every user at a specific time every day but timezone and server loading might be problem in this case.
I'm using MongoDB and Node.js for back-end and HTML, CSS, JS for front-end. How can I design my database and code to overcome this problem?
Thanks in advance.
I believe this question have enough detail please warn before closing.
Solution 1:[1]
You could possible save time of register of user and then every time on request of users that don't pays calculate the remaining time?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Michael Štekrt |
