At any time, you can load and serve an existing Genie app. Loading a Genie app will bring into scope all your app’s files, including the main app module, controllers, models, etcetera.
The recommended approach is to start an interactive REPL in Genie’s environment by executing
bin/repl in the os shell, while in the project’s root folder.
The app’s environment will be loaded.
In order to start the web server, you can next execute:
If you want to directly start the server, use
bin/server instead of
This will automatically start the web server in non interactive mode.
Finally, there is the option to start the serve and drop to an interactive REPL, using
On Windows the workflow is similar to macOS and Linux, but dedicated Windows scripts,
serverinteractive.bat are provided inside the project folder, within the
bin/ directory. Double click them or execute them in the os shell (cmd or PowerShell) to start an interactive REPL session or a server session, respectively, as explained in the previous paragraphs.
It is possible that the Windows executables
serverinteractive.bat are missing - this is usually the case if the app was generated on a Linux/Mac and ported to a windows computer. You can create them at anytime by running this generator in the Genie/Julia REPL (at the root of the Genie project):
julia> using Genie julia> Genie.Generator.setup_windows_bin_files()
Alternatively, you can pass the path to the project as the argument to
For Juno, Jupyter, and other interactive environments, first make sure that you
cd into your app’s project folder.
We will need to make the local package environment available:
using Pkg pkg"activate ."
using Genie Genie.loadapp()
In order to load a Genie app within an open Julia REPL session, first make sure that you’re in the root dir of a Genie app. This is the project’s folder and you can tell by the fact that there should be a
bootstrap.jl file, plus Julia’s
Manifest.toml files, amongst others. You can
julia> cd(...) or
shell> cd ... your way into the folder of the Genie app.
Next, from within the active Julia REPL session, we have to activate the local package environment:
julia> ] # enter pkg> mode pkg> activate .
Then, back to the julian prompt, run the following to load the Genie app:
julia> using Genie julia> Genie.loadapp()
The app’s environment will now be loaded.
In order to start the web server execute
The recommended way to load an app is via the
bin/serverinteractive commands. It will correctly start the Julia process and start the app REPL with all the dependencies loaded with just one command.