Starting
Command Line
You can use the Hoist CLI to start a basic server:
Programatically
For most cases, you are going to want more than just the CLI with your server. You can easily start a server via the start
utility:
You can also open the server in a temporary context with serve
:
Finally, you may directly create a server by instatiating hoist.Server
:
Note
All keyword arguments passed to start
or serve
are passed directly to hoist.Server
.
You may close the server at any time by calling close
:
Changing the URL
By default, all Hoist servers are put on 0.0.0.0:5000
. If you would like to change the host or port, you can pass them as keyword arguments to start
or serve
:
If you are directly creating a Server
object, you pass the arguments to start
instead of the constructor: