How Wapka's request router handles three eras simultaneously
A web request arrives at Wapka. It could be a WAP tag page from 2013, a visual builder page from 2020, or a Lua API endpoint from this year. The router needs to figure out which one — fast — and dispatch it to the right handler. Here is how that works. The dispatch chain Every incoming HTTP request passes through a priority-ordered dispatch: Step 1: Route matching The router checks the URL against registered routes. Lua scripts register routes via the framework (app:get, app:post). The REST API registers endpoints. Legacy WAP pages are mapped in the database. The router resolves the match and hands off to the correct handler. ...