Genie.bootstrap — Functiongenie() :: Union{Nothing,Sockets.TCPServer}Genie.down — Functiondown(; webserver::Bool = true, websockets::Bool = true) :: ServersCollectionShuts down the servers optionally indicating which of the webserver and websockets servers to be stopped. It does not remove the servers from the SERVERS collection. Returns the collection.
Genie.down! — Functionfunction down!(; webserver::Bool = true, websockets::Bool = true) :: Vector{ServersCollection}Shuts down all the servers and empties the SERVERS collection. Returns the empty collection.
Genie.genie — Functiongenie() :: Union{Nothing,Sockets.TCPServer}Genie.go — Functionloadapp(path::String = "."; autostart::Bool = false) :: NothingLoads an existing Genie app from the file system, within the current Julia REPL session.
Arguments
path::String: the path to the Genie app on the file system.autostart::Bool: automatically start the app upon loading it.
Examples
shell> tree -L 1
.
├── Manifest.toml
├── Project.toml
├── bin
├── bootstrap.jl
├── config
├── env.jl
├── genie.jl
├── log
├── public
├── routes.jl
└── src
5 directories, 6 files
julia> using Genie
julia> Genie.loadapp(".")
_____ _
| __|___ ___|_|___
| | | -_| | | -_|
|_____|___|_|_|_|___|
┌ Info:
│ Starting Genie in >> DEV << mode
└
[ Info: Logging to file at MyGenieApp/log/dev.logGenie.loadapp — Functionloadapp(path::String = "."; autostart::Bool = false) :: NothingLoads an existing Genie app from the file system, within the current Julia REPL session.
Arguments
path::String: the path to the Genie app on the file system.autostart::Bool: automatically start the app upon loading it.
Examples
shell> tree -L 1
.
├── Manifest.toml
├── Project.toml
├── bin
├── bootstrap.jl
├── config
├── env.jl
├── genie.jl
├── log
├── public
├── routes.jl
└── src
5 directories, 6 files
julia> using Genie
julia> Genie.loadapp(".")
_____ _
| __|___ ___|_|___
| | | -_| | | -_|
|_____|___|_|_|_|___|
┌ Info:
│ Starting Genie in >> DEV << mode
└
[ Info: Logging to file at MyGenieApp/log/dev.logGenie.run — Functionrun() :: NothingRuns the Genie app by parsing the command line args and invoking the corresponding actions. Used internally to parse command line arguments.
Genie.up — Functionup(port::Int = Genie.config.server_port, host::String = Genie.config.server_host;
ws_port::Int = Genie.config.websockets_port, async::Bool = ! Genie.config.run_as_server) :: NothingStarts the web server. Alias for Server.up
Arguments
port::Int: the port used by the web serverhost::String: the host used by the web serverws_port::Int: the port used by the Web Sockets serverasync::Bool: run the web server task asynchronously
Examples
julia> up(8000, "127.0.0.1", async = false)
[ Info: Ready!
Web Server starting at http://127.0.0.1:8000