Table of Contents

Hop command

Hop v3.6.0
usage: hop [options] ...
       hop [options] file.hop|file.hz|file.js ...

Misc:
   -h,--help                    This message
   --options                    Display the Hop options and exit
   --version                    Print the version and exit
   --buildtag                   Print the buildtag and exit
   --default-so-dir             Display default so dir
   -O                           Optimization mode (eq. to "--so-policy aot")
   -Ox                          Experimal optimization mode

RC & Autoload:
   -q                           Do not load an init file
   -qmime                       Do not load any mime file
   -qpreferences                Do not load any user preferences file
   --rc-file FILE               Load alternate rc file
   --rc-dir DIR                 Set rc directory
   --cache-dir DIR              Set cache directory
   --icons-dir DIR              Set Hop icons directory
   --no-cache                   Disable server caching
   --clear-cache                Clear all caches
   --no-clear-cache             Don't clear any cache
   --so-dir DIR                 Set libs directory (/home/serrano/.config/hop/so)
   --clear-so                   Clear sofiles directory
   --no-clear-so                Don't clear libs
   --no-so                      Disable loading pre-compiled file
   --so-policy POLICY           Sofile compile policy [none, aot, aot+, nte, nte1, nte+]
   --sofile-policy POLICY       Deprecated, use "--so-policy" instead
   --so-target LOC              Location for generated so file [sodir, src] [sodir]
   --autoload                   Enable autoload (default)
   --no-autoload                Disable autoload
   --add-autoload-dir DIR       Add autoload directory
   --autoload-dir DIR           Set autoload directory
   --mime-type FILE             Load aternate user mime-type file
   --preload-service SVC        Preload service

Verbosity & Logging:
   -vLEVEL                      Increase/set verbosity level (-v0 crystal silence)
   -gLEVEL                      Set debug level (do not use in production)
   -cg                          C debug compilation
   --client-output FILE         Client output port [stderr]
   --devel                      Enable devel mode
   --time                       Report execution time
   -wLEVEL                      Increase/set warning level (-w0 no warning)
   -sLEVEL                      Increase/set security level (-s0 no security enforcement)
   --no-color                   Disable colored traces
   --log-file FILE              Use <FILE> as log file
   --capture-file FILE          Use <FILE> as remote capture file
   --allow-service-override     Allow service overriding (see -s)

Run:
   -p,--http-port PORT          Port number [#f]
   --https-port PORT            Port number [#f]
   --listen-addr ADDR           Server listen hostname or IP
   --https                      Enable HTTPS
   --no-https                   Disable HTTPS
   --https-pkey PEM             HTTPS private key file
   --https-cert PEM             HTTPS certificate file
   -i,--session-id SESSION      Set session identifier
   --no-job-restore             Don't restore jobs
   -e,--eval STRING             Evaluate Hop STRING
   -j,--evaljs STRING           Evaluate JavaScript STRING
   --repl                       Start a repl
   --repljs                     Start a JS repl
   --jobs                       Enable jobs management
   --no-jobs                    Disable jobs management
   -z,--zeroconf                Enable zeroconf support
   --no-zeroconf                Disable zeroconf support (default)
   -d,--webdav                  Enable webdav support
   --no-webdav                  Disable webdav support
   -x,--xml-backend IDENT       Set XML backend [html-5]
   --accept-kill                Enable remote kill commands (see -k)
   --no-accept-kill             Forbidden remote kill commands
   -k,--kill                    Kill the running local HOP and exit
   --user USER                  Set Hop process owner
   --no-user                    Don't attempt to set the Hop process owner
   --server                     Start the Web server (default)
   --no-server                  Exit after loading command line files
   --exepath NAME               Set JavaScript executable path
   --acknowledge HOST           Acknowledge readiness

Paths:
   -I,--path PATH               Add <PATH> to hop load path
   -L,--library-path PATH       Add <PATH> to hop library path
   -l,--library LIBRARY         Preload additional <LIBRARY>

JavaScript:
   --js                         Enable JavaScript (default)
   --no-js                      Disable JavaScript
   --js-return-as-exit          Consider toplevel returns as exits
   --no-js-return-as-exit       Do not consider toplevel returns as exits
   --js-es6                     Enable all EcmaScript 6 supports
   --js-es2017                  Enable all EcmaScript 2017 supports
   --js-dsssl                   Enable DSSSL like JS services (deprecated)
   --js-option OPT VAL          Add JavaScript compilation option
   --js-modules-dir DIR         Set default node_modules dir [/usr/local/lib/hop/3.6.0/node_modules]
   --js-commonjs-export         Automatic commonjs modules export
   --no-js-commonjs-export      Automatic commonjs modules export
   --profile                    Profiling mode (see HOPTRACE)
   --profile-mem                Memory profiling mode

Internals:
   --configure CONFIG           Report HOP configuration
   --srfi FEATURE               Declare SRFI feature
   --no-thread                  Disable multithreading (equiv. to "--scheduler nothread")
   --max-threads M              Maximum number of handling HTTP requests
   --scheduler IDENT            Set scheduling policy [pool] (see --help-scheduler)
   --help-scheduler             Print available schedulers list
   --javascript-version VERSION JavaScript version to generate (default "1.5")
   --hopc PATH                  Hopc compiler ["/usr/local/bin/hopc-3.6.0"]
   --hopc-flags FLAGS           Hopc flags
   -- FILE                      Ignore next arguments

Shell Variables:
   - HOPHZREPOSITORY: repository of hz files
   - HOPTRACE: hop internal trace [HOPTRACE="key1, key2, ..."]
      j2s:info, j2s:type, j2s:utype, j2s:hint, j2s:usage, j2s:key
      j2s:dump, nodejs:compile, hopscript:cache, hopscript:hint
      j2s:scope hopscript:gc
   - HOPVERBOSE: an integer
   - HOPCFLAGS: hopc compilation flags
   - NODE_DEBUG: nodejs internal debugging [NODE_DEBUG=key]
   - NODE_PATH: nodejs require path

Runtime Command file:
   - rc-dir: /home/serrano/.config/hop
   - rc-file: hoprc.hop

Unix environments

The directory ROOT/arch contains various configurations for Linux systems, Android, and MacOS X system. In particular, it contains scripts for generating Hop pakcages for Arch Linux and Debian. This scripts might as a documentation for understanding how to spawn Hop automatically at boot time and how to run a safe Hop server to accepts connection on the port 80. The most relevant files for this are:

Shebang

To run Hop with a shebang (#!/... unix directive), use the following:

#!/usr/bin/env -S hop --no-server --