pols host
Publish a sandbox port over HTTPS, or list published ports
Publish PORT of a sandbox at https://<sandbox>-<port>.on.pols.so and print a
link to open it. Ports are private: the link logs your browser in to that
one address for 12 hours, and must be opened within 5 minutes. Run the
command again for a new link. With --public anyone can open the URL.
The service must listen on the sandbox’s network interface (0.0.0.0), not only on 127.0.0.1. Without PORT, list the published ports.
--domain also serves the port at a custom domain of yours and prints the
DNS records to set, as pols domains add DOMAIN --sandbox SANDBOX --port PORT
does (see pols domains --help).
Usage
pols host SANDBOX [PORT] [flags]
Examples
pols host web 3000 # private; prints a login link
pols host web 8080 --public # anyone with the URL
pols host web 8080 --public --domain example.com
pols host web # list
pols host web 8080 --remove # stop publishing
Flags
--domain string also serve the port at this custom domain (pols domains)
-h, --help help for host
--move with --domain: move the domain here from another of your sites or ports
--public let anyone open the URL, without a login link
--remove stop publishing the port
The global flags work with this command too.