Configuration

Environment variables

The package supports the following environment variables for configuration:

NameDefaultDescription
SERVER_PORT8000The port number on which the web server will listen
CLIENT_PORTSERVER_PORT + 1The port number on which the client will listen
OPEN_DOCUMENTATIONfalseOpen a window with the documentation after starting the server
OPEN_CLIENTfalseOpen a window with the client after starting the server
SERVER_HOST127.0.0.1Defines the base URL of the server
Note

You can choose to set these environment variables based on your specific requirements. If not set, the package will use the default values mentioned above.

Setting variables

To set environment variables, you can create a .env file in the root directory of your project.

Tip

You can copy the .env.template file as a starting point. Then, modify the values in the .env file according to your desired configuration.

To set an environment variable, you sould use the following syntax:

# .env file
export VARIABLE_NAME=value

For example, to set the SERVER_PORT environment variable to 9000, you can use:

export SERVER_PORT=9000

Load custom dotenv file

The dotenv file will .env as default. If a custom file is needed, you can use the command in the Julia REPL:

start(dotenv=".mycustomenv")

# or

load_envvars(".mycustomenv")
start()
Note

Please note that modifying environment variables may require restarting the web server for the changes to take effect.