Repl.Uptime
is an npm package designed to help keep your Replit projects online by monitoring their uptime and automatically creating an API.
To install Repl.Uptime, run the following command:
# NPM
npm add repl.uptime
# Bun.js
bun add repl.uptime
# Yarn
yarn add repl.uptime
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();
- 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
- .replit
run = "node -r repl.uptime/start index.js"
[nix]
channel = "stable-22_11"
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.
- 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. 🙏😇
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 .
Refer to the LICENSE file.