liara.server¶
Module Contents¶
Classes¶
API¶
- class liara.server.HttpServer(*, open_browser=True, port=8080, enable_admin=False)¶
Initialization
- get_url()¶
Get the URL at which the site is hosted.
- stop()¶
Stop the server.
This will stop the internal thread as well. It’s safe to call this function multiple times.
- reconfigure(liara: liara.Liara, cache: liara.cache.Cache)¶
Replace the liara instance of this server on the fly.
This can be only called after the server has been started using
start().
- start(liara: liara.Liara, cache: liara.cache.Cache)¶
Serve the site with just-in-time processing.
This does not build the whole site up-front, but rather builds nodes on demand. It will run the server in a separate thread, which needs to be shut down using
stop().The server can be reconfigured to use a different liara instance using
reconfigure(), in which case it will keep running and switch seamlessly to the new instance.