C++ SCHX ยท rev 4

CPGH Protocols

CPGH uses a custom protocol system to define how pages and endpoints are accessed. Protocols are defined in _CPGH.Protcol .

{`// _CPGH.Protcol CPGH::VERSION "1.0.0" CPGH::PROTOCOL "DO" { NAMESPACE: Page PATTERN: "do://Page/ " DEFAULT: Landing SECURE: false } CPGH::PROTOCOL "API" { NAMESPACE: Endpoint PATTERN: "/api/ " DEFAULT: users SECURE: true }`} NAMESPACE: Defines the handler type (Page, Endpoint, etc.) PATTERN: URL pattern with {' '} placeholder DEFAULT: Default page/endpoint when none specified SECURE: Requires authentication

Access pages via DO://Page/PageName

DO://Page/Index โ†’ serves _Landing.Page DO://Page/Main โ†’ serves _Main.Page DO://Page/About โ†’ serves About.Page ๐Ÿ”— Endpoint Protocol Access endpoints via /api/endpoint

๐Ÿ“ Protocol Definition

๐Ÿ“„ Page Protocol

๐Ÿ”— Endpoint Protocol