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

relogger

v1.0.3

Published

Remode logger for systems that have no dev tools

Downloads

8

Readme

relogger

A Remote Login System for devices where local logging is not available or easy (YEP I am talking about windows phone and similars).

Install

$ npm install --save-dev relogger

Usage

Require the 'relogger' and tell him in what port to listen

var relogger = require('relogger');
relogger().listen(1234);

If your page uses https then you need to pass certificate to relogger. If you are running a unix/linux machine you can create the certificate with the following commands:

openssl genrsa -out key.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem

Then, pass the certificates to relogger

var fs = require('fs');
var relogger = require('relogger');

relogger()
  .setCredentials(fs.readFileSync('key.pem'), fs.readFileSync('cert.pem'))
  .listen(1444);

Once you have the relogger server up and running you will see a message like the one below.

              .__                                             
_______   ____  |  |    ____     ____     ____    ____  _______ 
\_  __ \_/ __ \ |  |   /  _ \   / ___\   / ___\ _/ __ \ \_  __ \
 |  | \/\  ___/ |  |__(  <_> ) / /_/  > / /_/  >\  ___/  |  | \/
 |__|    \___  >|____/ \____/  \___  /  \___  /  \___  > |__|   
             \/               /_____/  /_____/       \/         

        Relogger Server up and running on port: 1444
        To enable remote logging please add the following script tag to your page: 
        <script type="text/javascript" src="https://10.63.85.113:1444/relogger/reloggerclient.js"></script>

Copy the mentioned script tag into you page and you are ready to go. Whenever you want to add a remote log you can do so with:

   console.re.log('test log');
   console.re.warn('test warn log', {data: 'some data'}, ['MORE DATA']);
   console.re.debug('test debug log');
   console.re.error('test error log');

The logs are sent through a FIFO queue which ensures that the all the logs happen in order.

Also once you have added relogger to your page, all uncaught errors will automatically be remotely logged.

##relogger-cli We now have a relogger-cli to ease the use of relogger <(^,^)>

If you want to know more please go to https://www.npmjs.com/package/relogger-cli

##Beware relogger has been thought for debugging in development environments. The server sets the header 'Access-Control-Allow-Origin' to '*' which is not very secure.

###Changes from 0.0.x to 1.0.0 I have removed the possibility of adding the relogger to your express app. In order to be able to support remote logs in secure servers (https) and complex logs I had to do more changes on the server configuration.

It is not a good idea to use a remote logging system that changes your server configuration behind the scenes. That is way I have decide to go for a stand alone version only.

I have also changed the syntax to make it more close to node's.