24 releases

0.2.9 Apr 13, 2024
0.2.2 Mar 8, 2024
0.2.1 Feb 2, 2024
0.1.19 Jan 29, 2024
0.0.1 Jan 21, 2024

#385 in Filesystem

Download history 76/week @ 2024-01-21 52/week @ 2024-01-28 33/week @ 2024-02-18 5/week @ 2024-02-25 95/week @ 2024-03-03 61/week @ 2024-03-10 2/week @ 2024-03-17 8/week @ 2024-03-31 108/week @ 2024-04-07 45/week @ 2024-04-14

161 downloads per month

MIT license

24KB
384 lines

NAME

pub - Publish anything to the open web

SYNOPSIS

pub [res1 path1]... [resN [pathN]]

DESCRIPTION

The pub command accepts an optional sequence of resource-path pairs, where resource could be any file, dir, port or url, and path specifies the mountpoint of the resource.

For each pair, the path is mandatory except for the last resource (resN). When the path is omitted, it defaults to "/".

In the special case of N=1, pub README.md / could be simplified to pub README.md.

EXAMPLES

# Publish a directory at the default path:
$ pub .

# Publish a dir at subpath:
$ pub /tmp/ /temp/

# Publish a specified port:
$ pub :8080

# Publish a URL at the default path:
$ pub https://example.com

# Publish a URL at the default path while restricting the request method to GET:
$ pub https://example.com 'GET /'

# Publish at a port with a specified path, followed by a URL at the default path:
$ pub \
  :9944 /rpc/ws \
  https://polkadot.js.org/apps/

SEE ALSO

Dependencies

~14–32MB
~503K SLoC