0.1.1 • Published 6 years ago

hypnolog-nodejs v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

HypnoLog NodeJS Library

What is HypnoLog?

Get Hypnotized While Logging

HypnoLog allows you to fast and easily visualize your application data/objects while debugging. From any environment, in any language. Forget about those black text-based console debug-printing back from the 70's.

See HypnoLog main repo.

What it looks like, visualizing your data in the browser: alt text

About HypnoLog-NodeJS Library

Logging using HypnoLog means sending you data as JSON HTTP request to HypnoLog server. This library wraps all of those into simple easy to use functions.

Installation

This is a Node.js module available through the npm registry.

npm install hypnolog-nodejs

If you haven't use HypnoLog before, setup HypnoLog server on your machine:

npm install -g hypnolog-server

Usage

  1. Start HypnoLog server:
    hypnolog-server
  2. View output: open http://127.0.0.1:7000/client.html in your browser.
  3. Import HypnoLog into your script:
    var HL = require("hypnolog-nodejs")
  4. Log:

    // Log a string
    HL.log('Hello HypnoLog from NodeJS!');
    
    // log array of numbers as a graph (plot)
    HL.log([1,2,3], "plot");

For more examples, see Basic Example and Advanced Example code files.

Read how to view the log and more about HypnoLog in HypnoLog main repo page.