repl.uptime
v0.0.12
Published
keep your Replit projects online by monitoring their uptime and automatically creating an API.
Downloads
783
Readme
Repl.Uptime
Repl.Uptime
is an npm package designed to help keep your Replit projects online by monitoring their uptime and automatically creating an API.
Installation
To install Repl.Uptime, run the following command:
# NPM
npm add repl.uptime
# Bun.js
bun add repl.uptime
# Yarn
yarn add repl.uptime
Usage
Repl.Uptime can be used in your Replit projects to monitor their uptime and automatically create an API. Here is an example of how to use it:
import { startUptime } from "repl.uptime";
/*
//CJS
const { startUptime } = require("repl.uptime")
*/
startUptime();
Preload
- If you do this, you do not need to write a callback, the package will be called in advance
node -r repl.uptime/start index.js
Here's an example of a .replit file. Modify it to this content.
- .replit
run = "node -r repl.uptime/start index.js"
[nix]
channel = "stable-22_11"
Note
By default, Repl.Uptime will monitor the project's uptime every 50 seconds and create an API that returns a JSON object with the project's title, description, and URL. You can customize the configuration by creating a uptime.config.json
file in your project's root directory. Here is an example of the default configuration:
{
"debug": false,
"create_api": true,
"port": 3000,
"path": "/"
}
You can modify any of these properties to customize the behavior of Repl.Uptime.
Sponsors
- Love what I do? Send me some coffee !? ☕
- Can't send coffees? Your support will help me to continue working on open-source projects like this. 🙏😇
Help
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official Discord Server .
License
Refer to the LICENSE file.