Skip to content

🌍 Static HTTP server, useable through command line & lib

License

Notifications You must be signed in to change notification settings

Vuzi/http-expose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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]

About

🌍 Static HTTP server, useable through command line & lib

Resources

License

Stars

Watchers

Forks

Packages

No packages published