Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
- Updated electrobun.config.ts to include environment-based settings for stability and external dependencies. - Refactored package.json scripts for improved build processes and streamlined commands. - Added new build scripts for Linux and renderer, while removing the obsolete build-server script. - Enhanced pre-build validation to ensure required files are present and added logging for better visibility. - Updated clean-build script to remove additional artifact directories for thorough cleanup.
1.9 KiB
1.9 KiB
Farm Control Server
A Bun application that bridges communication between Farm Control cloud services, local websocket clients, and connected printers.
Features
- Connects to the Farm Control websocket API
- Provides a local HTTP server for CLI and integrations
- Desktop UI built with React, Ant Design, and Electrobun
- Headless Linux service packaging for servers and Raspberry Pi hosts
- Relays printer and document printer state to the desktop UI
Requirements
- Bun 1.1 or newer
Installation
- Clone this repository
- Install dependencies:
bun install - Edit
config.jsonfor your environment - Start the server:
bun run dev
Development
- Headless server:
bun run dev - Desktop app with hot reload:
bun run dev:app - Renderer only:
bun run dev:renderer
Building
Build configuration lives in electrobun.config.ts and follows the Electrobun build configuration model:
- preBuild — validates sources, writes build metadata, and runs the Vite renderer build
- postPackage — normalizes release artifacts (DMG/PKG on macOS, MSI on Windows)
Commands:
- Desktop app (current platform):
bun run build:app - macOS universal (arm64 + x64):
bun run build:app:mac - Linux headless packages:
bun run build:linux - Clean build outputs:
bun run clean
Desktop artifacts are written to app_dist/. Linux headless builds produce .deb and .rpm packages in the same folder.
Configuration
config.json contains development and production sections. Each section supports:
logLevelurl(websocket server)apiUrlhost.idandhost.authCodedataDir
License
MIT