
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
spin-up-ping
Advanced tools
Keep your server awake and prevent it from spinning down due to inactivity! Perfect for free-tier hosting platforms like Render, Heroku, etc.
Keep your server awake and prevent it from spinning down due to inactivity! Perfect for free-tier hosting platforms like Render, Heroku, etc.
Free-tier hosting services often spin down your server after a period of inactivity (usually 15-30 minutes). This can lead to slow response times when the server needs to spin up again. spin-up-ping
solves this by sending periodic pings to keep your server alive.
# Using npm
npm install spin-up-ping
# Using yarn
yarn add spin-up-ping
# Using pnpm
pnpm add spin-up-ping
import {SpinUp} from "spin-up-ping";
const pinger = new SpinUp({
url: "https://your-server.com", // Your server URL
intervalMinutes: 5, // Minimum 5 minutes
onSuccess: (response) => {
// Optional success callback
console.log("Ping successful:", response);
},
onError: (error) => {
// Optional error callback
console.error("Ping failed:", error);
},
});
// Start pinging
pinger.start();
// Stop pinging (if needed)
pinger.stop();
interface SpinUpOptions {
url: string; // URL to ping
intervalMinutes: number; // Interval between pings (min: 5)
onSuccess?: (response: any) => void; // Success callback
onError?: (error: Error) => void; // Error callback
}
start()
: Start the ping servicestop()
: Stop the ping serviceFree Hosting Services
Development & Testing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)ISC © Muhsin Abdul Nissar
If you found this package helpful, please consider giving it a star on GitHub!
FAQs
Keep your server awake and prevent it from spinning down due to inactivity! Perfect for free-tier hosting platforms like Render, Heroku, etc.
We found that spin-up-ping demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.