简体   繁体   中英

How to store the Live Time in Json File using Node js?

I'm new in node js, when I create the Countdown Clock, Using With Nodejs and javascript,

I'm facing an issue with When the server restarted The Timer also Restarted

在此处输入图像描述

JSON File Using

StartTime.json 

    "UserTime": [
            {
                "id": 1,
                "name": "Jack",
                "TimeDuration": 25:00
            },
            {
                "id": 2,
                "name": "Mike",
                "TimeDuration": 30:00
            }
    ]

StartTime -> 30:00 mins, ReminingLiveTime->24:52;

After Restarting I need the Same ReminingLiveTime to be stored on the server.

I understood Your Question, Initially you Just Create Custom Api, Before Restarting The Server Pass the Time On it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM