/exposy-cli

CLI tool to expose localhost port to internet via exposy server

Primary LanguageJavaScriptMIT LicenseMIT

exposy-cli

CLI tool to expose localhost port to internet via exposy server

Installation

npm install -g exposy

Usage

Run exposy config to configure exposy-server settings

exposy start -p <any local app's port>

Run exposy -h for help menu

What is Exposy ?

Exposy is a solution for exposing developer's local HTTP APIs over Internet using a single command.

How does Exposy work?

Exposy system has 2 components:

  • exposy-server

    exposy-server is a web socket server & http server,that needs to be hosted & made available over internet. This proxies http requests coming over internet to exposy-cli socket client via a unique http end point specific to developer's machine & specified port. See design diagrams to know more.

  • exposy-cli

    exposy-client is npm based CLI that needs to be installed on developer's system. It connects to exposy-server via web sockets & interchanges data to & from localhost web apps by calling localhost & sending response back to exposy-server over socket.See design diagrams to know more.


Design Diagrams

Overall Design

Overall

Exposy CLI Design

exposy cli

Exposy Server Design

exposy server

To test/develop exposy-cli locally, hosted instance of exposy server (local or cloud) is required. Follow below steps to setup exposy-server local instance

Setup Exposy Server

  • exposy-server
  • Run npm install
  • Create .env file from .env.example
  • Run npm run dev

Setup Exposy CLI

  • Fork exposy-cli
  • Run npm install
  • Run npm install -g . from the root directory (required for recognizing exposy command in terminal )
  • Run exposy config to configure exposy-server settings
  • Run exposy start -p <any local app's port which you want to expose>