Code Monkey home page Code Monkey logo

portera's Introduction

Portera

Awesome remote logs for node

Motivation

Coronavirus quarantine time at home, brought me to prectice node. I began to do a sample project for the company where I work because it was something that I have in mind for some time ago. The project its like a middleware between our different management software and third part applications, this middleware should contain all bussiness logic necesary by thrird part systems. This part is more or less completed and I added a GraphQL interface to learn it, after this I have a lot of queries and results from my program that I needed check. Then problem was that I have only my laptop and between code editor and web interface I haven´t enaugh screen to show query logs. Then I thought that I could use my tablet as a remote log viewer, and here is the result !!!

Installation

Install portera in your dev environment

npm install portera --save-dev`
Portera server

portera is a client/server program that run on port 3001 by default, you can change this using environment variable PORTERA_PORT. To execute the server exec npx portera command, once running you can open your favorite browser using portera address http://<portera_server_ip>:3001

npx portera

you will see your logs in server console

Sample Web

portera sessions are stored on local machine storage you can delete this using "clear session" button on top.

ms are time between calls in your program

Sample Console: Sample Console Image

Use portera in your code

To redirect your output to portera you need import portera module

const portera = require("portera");

// console outputs will be send by portera
portera("http://localhost:3001", console);

Portera commands

portera.log(...)
portera.info(...)
portera.warn(...)
portera.error(...)
portera.trace(...)
portera.assert(...)
portera.stack()

portera's People

Contributors

csegura avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.