npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lalit_kumar/wakeit

v1.0.0

Published

An ultra-lightweight, zero-dependency, plug-and-play React pre-warmer tool designed to solve cold-start delays on free-tier backend hosting platforms (Render, Railway, Fly.io, Heroku).

Downloads

167

Readme

⚡ wakeit — Plug & Play Backend Pre-Warmer

wakeit is an ultra-lightweight, zero runtime dependency, plug-and-play React tool designed to solve cold-start delays on free-tier backend hosting platforms (Render, Railway, Fly.io, Heroku).


⚡ How It Works (Smart UX)

  1. Silent Health Check: When a user lands on your app, wakeit silently pings your backend health endpoint.
  2. Server is Alive (<1.5s): If the backend responds quickly, no banner is shown and warm status is saved to localStorage. Zero distraction!
  3. Server is Sleeping (>1.5s): Render cold-starts take ~30-50s. After 1.5s (configurable delay), wakeit displays a clean floating badge (⚡ Waking up server...). Once Render finishes booting, it switches to green (🟢 Server Warm & Ready!) and auto-hides!
  4. Persistent Cross-Tab Cache: Once verified warm, wakeit caches status in localStorage (default 14 minutes) so F5 refreshes and new browser tabs skip unnecessary health checks.

Note: Requires react and react-dom (v18 or v19) as peer dependencies.


🚀 Quick Setup

1. Wrap your Root Component

import { WakeItProvider, WakeItBanner } from "wakeit";

export default function App() {
  return (
    <WakeItProvider healthEndpoint="https://your-api.onrender.com/api/health">
      <YourAppRoutes />
      <WakeItBanner />
    </WakeItProvider>
  );
}

2. Use the Hook in Any Component (Optional)

import { useWakeIt } from "wakeit";

function PlayButton() {
  const { isReady, isWarming, responseTimeMs } = useWakeIt();

  return (
    <button disabled={isWarming}>
      {isWarming ? "Server starting..." : "Start Game"}
    </button>
  );
}

⚙️ Configuration (WakeItConfig)

Customize behavior globally via the config prop or defaultWakeItConfig:

import { WakeItProvider, type WakeItConfig } from "wakeit";

const customConfig: WakeItConfig = {
  // Health check endpoint
  healthEndpoint: "https://your-api.onrender.com/api/health",

  // Screen placement: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'bottom-center' | 'top-center'
  position: "bottom-right",

  // Visual Toggles
  showBannerOnWarmup: true,   // Show yellow 'Waking up server...' banner
  showSuccessToast: true,     // Show green 'Server Warm & Ready!' toast
  showBannerOnError: false,   // Set true to show red alert banner on health check failure

  // Retries & Timing
  maxRetries: 3,              // Number of retries (or 'endless' for continuous auto-retries)
  retryIntervalMs: 5000,      // Delay between retry attempts (ms)
  bootWindowMs: 90000,        // Keep retrying this long (ms) while server answers 502/503/504 (still booting)
  showBannerDelayMs: 1500,    // Delay threshold before popping up banner (ms)
  timeoutMs: 65000,           // Request timeout before aborting ping (ms)
  autoHideMs: 4000,           // Duration before success toast auto-hides (ms)
  cacheTtlMs: 14 * 60 * 1000, // localStorage cache duration (14 minutes)

  // Custom UI Messages
  messages: {
    warming: "Waking up server...",
    warmingSubtext: "Render cold-start in progress (~30-50s). UI is ready!",
    ready: "Server Warm & Ready!",
    error: "Server connection delayed",
    errorSubtext: "Click retry to ping backend.",
    retryButtonText: "Retry",
  },
};

📄 License

MIT © wakeit