New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

http-expose

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-expose

Static HTTP server, useable through command line & as a lib

latest
Source
npmnpm
Version
0.2.4
Version published
Weekly downloads
12
300%
Maintainers
1
Weekly downloads
 
Created
Source

HTTP Expose 🌐

To expose a folder ./example on htttp://localhost:8000

$ expose ./example --port=8000

And now your directory is accessible ↴

$ curl http://localhost:8000/my/file.txt
this is my file content!

And for more, see usage 🚀

What's that?

HTTP Expose is a very simple and lightweight static HTTP server. It can be used to expose a provided directory to the internet through HTTP. 🧙‍♂️ The exposed directory will handle range request, caching and gzipping.

It can also be used programmmatically to do exactly the exact same thing 💻

Features

  • HTTP range request
  • HTTP caching
  • CORS
  • Gzip
  • Usable in command line, and programatically
  • Can list a directory content to facilitate navigation while debugging
  • Simple to use & configure

Lib usage

TODO ⚠️

Command line usage

Start with installing ↴

$ npm install -g http-expose

List of available arguments ↴

$ expose -h

Usage: http-expose <directory> [options]

Positionals:
  directory  Directory to expose                                        [string]

Options:
      --version            Show version number                         [boolean]
  -h, --help               Show help                                   [boolean]
  -p, --port               HTTP port                      [number] [default: 80]
      --host               HTTP host             [string] [default: "localhost"]
      --listdir            List directory content     [boolean] [default: false]
      --nocache            Disable caching            [boolean] [default: false]
      --cors-allow-origin  Cors allow origin setting     [string] [default: "*"]
      --verbose            Verbose                    [boolean] [default: false]

FAQs

Package last updated on 17 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts