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 🙏

© 2024 – Pkg Stats / Ryan Hefner

project-uptime

v0.0.5

Published

An simple NPM package that lets you know How long your Project is Online

Downloads

5

Readme

project-uptime

An simple NPM package that lets you know How long your Project is Online

Installation

npm i project-uptime

project-uptime is working at Node v4+

Documentation

A lot of endpoints are works Normal.

Main Function [Very Required] |Method|Description|Parameters|Returns| |-------|--------|--------|--------| |startRecord|Start/Resume Recording Your Project Uptime|-|-| |pauseRecord|Pause the Records. This doesn't Reset your Records.|-|-| |resetRecord|Reset all your Records to 0|-|-|

Records (Start after records) |Method|Description|Parameters|Returns| |-------|--------|--------|--------| |second|Gets your Second Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime ;)|-|Returning your Second Records| |minute|Gets your Minute Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime ;)|-|Returning your Minute Records| |hour|Gets your Hour Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime ;)|-|Returning your Hour Records| |day|Gets your Day Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime ;)|-|Returning your Day Records| |week|Gets your Week Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime ;)|-|Returning your Week Records.| |month|Gets your Month Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime ;)|-|Returning your Month Records.| |year|Gets your Year Records, Feel free for Customize your own design for Logging & Showing Record of your Uptime |-|Returning your Year Records.| |all|Gets All Of Your Uptime Records. |-|Returning all of Your Records.| |short|Telling your Uptime by returning Short Information.|-|Returns an Short Uptime Records|

NoFilter (Starts after NoFunction) NoFilter is an Function where The User can gets The Uptime Records without any Cutted Result. example, When Passed 1 Minute, The Output of NoFilter Second is 60 Which means 60 Second. Method|Description|Parameters|Returns| |-------|--------|--------|--------| |second|Gets your Second Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime. But that's Not CUTTED-OFF after 1 Minute Passed. So it keeps counting to 61, 62, and Above.|-|Returning your Second Records without Filter.| |minute|Gets your Minute Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime. But that's not Filtered, So when 1 Hour passed, The Minute NoFiltered Output is 60 Which means 60 Minute, And keeps continue to 61, 62 and Above|-|Returning your Minute Records without Filter.| |hour|Gets your Hour Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime, But that's NoFilter|-|Returning your Hour Records without Filter| |day|Gets your Day Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime, But that's not Filtered.|-|Returning your Day Records without Filter| |week|Gets your Week Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime, But not Filtered ;)|-|Returning your Week Records without Filter.| |month|Gets your Month Records, Feel free for Customize your own design for Logging & Showing Records of Your Uptime, But not Foltered;)|-|Returning your Month Records without Filter.|

By the way, NoFilter Is not have Years NoFilter Record because YEAR records is already No Filtered, And that's Impossible if Project can Uptime at 23-98 Year.

Setup

  1. Let's begin the setup, But first, Let's Create an Variable
const projectuptime = require("project-uptime");

And last, Let's Start Record your Uptime

projectuptime.startRecord()

Let's see your Uptime, But we suggest you for Use short

projectuptime.records.short();

Output when your Project is Running at 30 Second

30 Second

Output when your Project is Running at 5 Minute

50 Minute

And keeps Recording 24/7.

Example & Output

-Example 1

  • Showing All Records Information
const projectuptime = require("project-uptime");

// Lets Make it keeps Showing the Records
setInterval(function() {
console.clear()
//Clear the Console so it doesn't Spamming :D
// Remove `console.clear()` If your Node version is v4
console.log(projectuptime.records.all())
}, 1000);

//Let's start Recording
projectuptime.startRecord()

Output When runs 9 Hour:

0 Year : 0 Month : 0 Week : 0 Day : 9 Hour : 48 Minute : 32 Second
  • Example 2
    • Customing your own Design
const projectuptime = require("project-uptime");

//Let's Make Variable
var record = projectuptime.records;

var second = record.second();
var minute = record.minute();
var hour = record.hour();
var day = record.day();
var week = record.week();
var month = record.month();
var year = record.year();
//Make Blank Variable
var uptime;
// Lets Make it keeps Showing the Records


setInterval(function() {
// Change the uptime variable to Defined
// Keep that mind if uptime Variable must Changed Every time so the Output is Correct.
uptime = `${year} Year : ${month} Month : ${day} Day`
// You can Customize your Self Design

console.clear()
//Clear the Console so it doesn't Spamming :D
// Remove `console.clear()` If your Node version is v4
console.log(uptime)
// Return your Own design
}, 1000);

projectuptime.startRecord();

Output when Project Running at 5 Month

0 Year : 5 Month : 23 Day

Community

Any question or Doubt can Join our Discord Server.