Skip to main content

DotHRB: Develop, Run, Build

The DotHRB DotHRB executable serves a dual role: it is both an Application Server for running deployed applications and a command-line tool for building, testing, and managing DotHRB code.

Usage Syntax

dothrb [options] [command]

1. ⚙️ Global Options

These options configure the server environment, logging, and connection parameters.

OptionDescription
-h / -helpDisplay the help documentation.
-c <conf>Set the Configuration profile: Debug or Release.
-e <env>Set the Environment: Development or Production.
-url <url>Set the listen URL for the application server (e.g., http://localhost:5000).
-dbs <json>Set dotdbs connection parameters (JSON format).
-p:<prop=val>Set a specific system property to a defined value.
-l <0-9>Set the log level (0 for minimal, 9 for verbose debugging).
-workdirSet the working directory for the executed command.
-oSet the output path for build commands.
-err-stopHalt execution immediately in case of an error.
--licenseDisplay license and copyright information.
--versionDisplay the tool version number.

2. 🧩 Commands

These actions are used for project lifecycle management (building, running, testing) and server control.

CommandDescription
runBuild and run the project or a specific program file (.prg).
buildCompile the project sources into deployable artifacts.
watchMonitor sources for changes and automatically rebuild/hot-reload the application (used for development).
publishPrepare the project for deployment, creating a final published package.
testExecute project tests defined in the codebase.
cleanRemove build outputs (compiled files, artifacts) from the project directories.
connectTest a dotdbs server connection using the parameters defined by the -dbs option.
htmlStart as a plain HTTP/HTML server (serving static files).
eval "expression"Evaluate the given expression and print the result to standard output (stdout).

3. 📝 Practical Examples

ScenarioCommandPurpose
Hot-Reload Dev Modedothrb watch runStarts the application and watches files, providing a quick development cycle.
Run Published Appdothrb myapp.appLaunches an application that has already been published/compiled.
Static File Serverdothrb htmlStarts a minimal server to serve static HTML and assets.
Test DB Connectiondothrb -dbs dbs.json connectAttempts to establish a connection to the dotdbs server using settings from dbs.json.
Code Evaluationdothrb -eval "left('He', 1)"Executes a simple DotHRB code expression and prints the result (H).
Run Specific Programdothrb run mytest.prgCompiles and executes a single program file.