The binary executable is a command-line interface (CLI) that allows you to configure how the analytics instance behaves. This document outlines the available commands and their usage.
Commands
start
: Starts the analytics server.
version
: Displays the version of the analytics server.
start
The following flags can be used with the start
command:
Usage of start:
-analyticsdb string
Path to analytics database. (default "./me_analytics.db")
-appdb string
Path to app database. (default "./me_meta.db")
-autossl string
Automatically provision SSL certificates to the specified domain and redirect HTTP requests to HTTPS.
Requires the server to run on ports 80 and 443. The domain must be publicly accessible and resolve to the server.
-autosslemail string
Email address to optionally send SSL certificate notifications.
-corsorigins string
Comma separated list of allowed CORS origins on API routes. Useful for external dashboards that may host the frontend on a different domain.
-demo
Enable demo mode restricting all POST/PATCH/DELETE actions (except login).
-env
Opt-in to allow environment variables to be used for configuration. Flags will still override environment variables.
-level string
Logger level (debug, info, warn, error) (default "info")
-logger string
Logger format (json, pretty) (default "json")
-port int
Port to listen on. (default 8080)
-profiler
Enable debug profiling.
Example usage:
./medama-executable start -env -port=8080 -logger=pretty -level=debug -corsorigins=http://localhost:8080,http://localhost:3000