repl.uptime
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

Repl.Uptime status

Repl.Uptime is an npm package designed to help keep your Replit projects online by monitoring their uptime and automatically creating an API.

Powered by Shuruhatik Powered by Better Stack

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.

Readme

Keywords

none

Package Sidebar

Install

npm i repl.uptime

Weekly Downloads

243

Version

0.0.12

License

BSD-2-Clause

Unpacked Size

15.4 kB

Total Files

7

Last publish

Collaborators

  • shuruhatik