This extremely simple http server allows you to start a timer and then check the progress of the timer, simulating a battery.
First, run the build.sh
to build the docker container. You can then make run the container with run.sh
.
- Send a POST request to start (or re-start) the battery timer;
- Send a GET request to see the current status.
All responses have the following format:
{
status: boolean,
message: string,
}
A successful status request has the following additional keys:
{
timeRemaining: number, // int
percentageRemaining: number, // float
percentageRemainingString: string, // format: "x%"
}