wakeup-calculator-api
v1.0.1
Published
An API that calculates optimal sleep times based on a wake-up time using 90-minute sleep cycles.
Maintainers
Readme
🛌 Wake-up Time Calculator API
This is a simple Node.js + Express API that helps users calculate the best times to go to sleep based on their desired wake-up time, using 90-minute sleep cycle logic.
🧠 Concept
- One full sleep cycle = 90 minutes
- It takes ~15 minutes to fall asleep (included in calculation)
- Ideal sleep: 4 to 6 cycles per night
📦 Features
- Get suggested sleep times for a given wake-up time
- Each result includes number of sleep cycles, sleep time, and total sleep duration in hours & minutes
- Fast and lightweight REST API
🚀 Getting Started
const { wakeup_time } = require("wakeup-calculator-api");
const {time}=req.body;
const result = await wakeup_time(time);
exp
{
"time": "03:00"
}
