afterglow.core

This is the main class for running Afterglow as a self-contained JAR application. When you are learning and experimenting in your REPL, the main namespace you want to be using is afterglow.examples

-main

(-main & args)

The entry point when invoked as a jar from the command line. Parse options and start servers on the appropriate ports.

cli-options

The command-line options supported by Afterglow.

error-msg

(error-msg errors)

Format an error message related to command-line invocation.

exit

(exit status msg)

Terminate execution with a message to the command-line user.

init-logging

(init-logging)(init-logging appenders-map)

Set up the logging environment for Afterglow. Called by main when invoked as a jar, and by the examples namespace when brought up in a REPL for exploration, and by extensions such as afterglow-max which host Afterglow in Cycling ’74’s Max.

nrepl-server

Holds the running REPL server, if there is one, for later shutdown.

osc-server

Holds the running OSC server, if there is one, for later shutdown.

session-cleaner

Holds the future which is cleaning up expired web sessions, if any.

start-nrepl

(start-nrepl port)

Start a network REPL for debugging or remote control.

start-osc-server

(start-osc-server port)

Start the embedded OSC server on the specified port.

start-web-server

(start-web-server port)(start-web-server port browser)

Start the embedded web UI server on the specified port. If a truthy value is supplied for browser, opens a web browser window on the newly launched server. If the server was already running, logs a warning. Either way, makes sure the background thread which cleans up expired sessions is running.

stop-osc-server

(stop-osc-server)

Shut down the embedded OSC server if it is running.

stop-servers

(stop-servers)

Shut down the embedded web UI, OSC and NREPL servers.

usage

(usage options-summary)

Print message explaining command-line invocation options.

web-server

Holds the running web UI server, if there is one, for later shutdown.