0.1.4 • Published 12 months ago

@giancarl021/code-viewer v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Code-Viewer

CLI tool to view code from a local folder through a webserver.

Installation

npm install --global @giancarl021/code-viewer

Usage

The application have a single command: serve, which starts the webserver and routes the local files to the browser.

The description of this command is the following:

code-viewer serve [<path/to/expose>]
  Description: Exposes a path on the given port, default path is current working directory       
  Flags:
    -p | --port: The port to serve the application on, default PORT environment variable or 3000 
      Values: <port>
    -t | --tunnel: Create a tunnel to the internet with the localtunnel service

Supposing you want to expose the src directory in the current working directory on port 8080, you can run the following command:

code-viewer serve src --port 8080