Importing Genie apps

If you have an existing Genie app, you have two ways of bringing it onto Genie Cloud:

  1. Adding the code and data to the workspace of the development environment.
  2. Cloning an app's GitHub repository.

You can also bootstrap your account with all the apps from the demos repository. For more details, scroll to the bottom of this page.

Method 1: adding code and data into the workspace

Follow these steps to import an existing Genie app into the workspace:

  1. Create a new app from the dashboard.
  2. Launch the package manager and install the packages your app needs.
  3. Stop the app.
  4. Drag and drop your code and data files onto the workspace folder. Replace any existing app.jl or app.jl.html if necessary.
  5. Start the app.

Installing packages from the REPL

You can also install packages from the Julia REPL. Here's how:

  1. Create a new app from the dashboard and stop it from running.
  2. Copy your app's Project.toml.
  3. Open a new terminal.
  1. Navigate to your app's folder at ~.julia/geniebuilder/apps/your-app and start a REPL with julia --project.
  1. Enter Pkg mode with ] and execute instantiate.
  2. Once the packages are installed, run the app from the Genie Apps menu.

Method 2: cloning an app's GitHub repository

The terminal on Genie Cloud comes with git installed. Follow these steps to import an app from a repository:

  1. Clone the repository in the ~.julia/geniebuilder/apps/ folder and. Install the required packages as in the previous section, and ensure the folder name is in lower case.
  1. Create a new app from the dashboard, using the same name as the cloned repository.

Once the app creation process finishes, the cloned code will be available in the app's workspace.

Bootstrapping your account with the demos repository

To preload your account with apps fgrom the demos repository, follow these steps:

  1. Open a terminal and navigate to ~.julia/geniebuilder/
cd ~/.julia/geniebuilder/
  1. Delete the apps folder:
rm -rf apps
  1. Clone this repository into a new apps folder:
git clone https://github.com/GenieFramework/GenieBuilderDemos.git apps
  1. Go into apps and install the required packages for each app:
cd apps
for dir in */ ; do
  if [ -d "$dir" ]; then
    echo "Processing $dir"
    cd "$dir"
    julia --project=. -e 'using Pkg; Pkg.instantiate()'
    cd ..
  fi
done
  1. Go to the dashboard and stop the development environment.
  1. Wait a minute to make sure the development environment is completely stopped. Then, restart it.

After one or two minutes, the apps should now appear in your dashboard and development environments.