搜索

PythonReactSEOPDF
GitHub Skill

daemon-port-management

Instructions for managing application ports with the AutomateLinux daemon.

yanivprusman☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Port Management

The AutomateLinux daemon acts as a central registry for application ports, allowing cross-component service discovery.

CLI Usage

Use the high-level d command (which aliases daemon send) to manage ports.

Setting a Port

Registers a port for a specific key (e.g., pt for Public Transportation).

d setPort --key pt --value 3001
Getting a Port

Retrieves the currently registered port for a specific key.

d getPort --key pt
Listing All Ports

Displays a list of all registered applications and their assigned ports.

d listPorts
Deleting a Port

Removes the port mapping for a specific key.

d deletePort --key pt

How it Works

Persistence

The daemon stores these ports in the settings table of its MySQL database. The keys are automatically prefixed with port_ (e.g., port_pt).

Integration

Component logic (like in mainCommand.cpp or InputMapper.cpp) can retrieve these values using the SettingsTable manager:

string port = SettingsTable::getSetting("port_pt");
if (!port.empty()) {
    string url = "http://localhost:" + port;
}

Port Allocation Scheme

  • 3000-3499: App prod/dev ports (2 per app, sequential)
  • 3500+: Special operational ports (WebSocket servers, bridges, etc.)

Current Port Registry

Key Port Description
cad-prod 3000 CAD app production
cad-dev 3001 CAD app development
pt-prod 3002 Public Transportation production
pt-dev 3003 Public Transportation development
loom-prod 3004 Loom client production
loom-dev 3005 Loom client development
dashboard-prod 3006 Dashboard frontend production
dashboard-dev 3007 Dashboard frontend development
loom-server 3500 Loom WebSocket stream server
dashboard-bridge 3501 Dashboard daemon bridge

[!NOTE] Port management is useful for macros that need to launch browsers or proxy services to specific local addresses without hardcoding them in the binary.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!