instantly_http
TypeScript icon, indicating that this package has built-in type declarations

1.1.12 • Public • Published

General introduction

A command line tool to serve local directory with http protocol

Installation

# Install globally:
npm i instantly_http -g 

Options

instant_http --help
Usage: instant_http  [global options]

Options:
  -V, --version                      output the version number
  -p --port [port]                   To point which port to use as the server address. (default: "9090")
  -d --dir [dir]                     Dir to serve (default: "/home/frank/code/InstantHttp")
  -pt --proxyTarget [proxyTarget]    Where the delegated communication targets to
  -pp --proxyPattern [proxyPattern]  URL matcher to be used to identify which url to proxy
  -o --open [open]                   Whether to open chrome automatically (default: false)
  -m --mode [mode]                   Which mode to use (default: "NORMAL")
  -i --indexFile [indexFile]         Index File location(relative to --dir) (default: "index.html")
  -q --quiet [quiet]                 Set it to false to see more debug outputs (default: false)
  -h, --help                         display help for command

Usages

MJS/TS

import {run} from 'instantly_http';

CJS

const {run} = require('instantly_http');

As a binary

./instantHttp  --open=false --port=8080 --proxyTarget=http://google.com --proxyPattern=/proxy

Build for portable binary

After checkout then install this repository, you can then try below commands to get an executable binary.

npm run build-binary

pkg is used as the package utility, please check pkg's document in order to build runnable binaries as you want.

Test

npm run test

Dependencies (6)

Dev Dependencies (26)

Package Sidebar

Install

npm i instantly_http

Weekly Downloads

4

Version

1.1.12

License

MIT

Unpacked Size

33 kB

Total Files

12

Last publish

Collaborators

  • pillsilly