Crates.io | pub |
lib.rs | pub |
version | 0.3.4 |
source | src |
created_at | 2024-01-21 09:48:09.693949 |
updated_at | 2024-05-02 18:59:17.037142 |
description | publish anything to the open web |
homepage | |
repository | https://github.com/btwiuse/pub |
max_upload_size | |
id | 1107470 |
size | 79,611 |
pub - Publish anything to the open web
pub [res1 path1]... [resN [pathN]]
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
.
# 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/