0.1.6 • Published 5 years ago

lightningcomm v0.1.6

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

⚡Lightningcomm - Server Visualizer Library

Project Iteration of Spypress - A Server Visualizer

Developed by: Andy Wong, Courtney Kwong, Jackie Lin, Olga Naumova
Contributors: Anthony Toreson, Mark Shin, Michelle Herrera, and Ruth Anam

Getting Started

Installation

npm i lightningcomm

Server-side setup

Within your server.js, import the Lightningcomm library

const  lightningcomm  =  require("lightningcomm");

Requires the Express module just as you require other modules and and puts it in a variable.

const app = express();

Invoke your function lightningcomm. It takes your express module as an argument.

const lc = lightningcomm(app);

TL;DR

What is Lightningcomm?

Lightningcomm is an iteration of the SpyPress project, a lightweight, open source tool designed to help developers visualize requests from the client.

Lightningcomm

The Problem

There’s a strange satisfaction when you first create a box or button and have it appear on the front end of your application. Maybe you create a button with an event listener, sure you can go to the front end of your application to test the functionality of your button BUT what does this action look like in the back-end?

How do you VISUALIZE all outgoing requests and incoming responses with dynamic bits of data flowing in and out of your database all in a simple page?

Lightningcomm is the Solution

It might be difficult to imagine a piece of data flowing in and out of your code base, but we can utilize the front-end to display any information we send. As Lightningcomm is a library built upon SpyPress framework, imagine a piece of data being represented as an important person (ie: the President of a country). We want to send a spy to constantly keep a watch on this person and report back on all of this person’s moves. This spy is named SpyPress.

Lightningcomm is a tool that can be run alongside any project to spy on requests and responses coming to and from the server. Using Lightningcomm is as easy as installing the npm package and requiring the the library to be used in your server file. Lightningcomm comes with a set of methods that allow the user to "listen" to the communications made with/by the server on the backend. Once incorporated into your project, all you need to do is run your server in development mode. Lightningcomm will open up it’s own server on a localhost port to display all requests and responses via the front end in the browser

Who is Lightningcomm for?

Lightningcomm is meant for developers working with lightweight server-side frameworks. Developers can utilize Lightningcomm to visualize the servers they are creating and managing allowing them to optimize their servers through constant, real time monitoring of data passed from the client to server to database and back!

At present, visualization is limited to client requests.

How?

As Lightningcomm requires continuous data exchange, this project is made possible with the WebSocket protocol which provides a way to exchange data between browser and server via a persistent connection. The data can be passed in both directions as “packets”, without breaking the connection and additional HTTP-requests.