Server API
App
Handles all incoming client requests. Owns its own Router and TokenBucket — no shared global state.
Import
local app = RoExpress.GetApp() -- typed · or: RoExpress("App")
GET
POST
PUT
DELETE
Route Handlers
Register handlers for any HTTP-style method. Typed params, wildcards, globs, inline constraints, and optional Deflate compression per route.
app:Get · app:Post · app:Put · app:Delete
→
middleware
Middleware
Chain auth guards, loggers, and validators that run before every handler. Return
false to block with 403, throw to send 500.
app:Use · app:Unuse
→
object
Request Object
The
req argument passed to every handler — typed params, positional captures, query strings, raw payload, and the requesting player.
req.params · req.query · req.data · req.player
→
object
Response Object
The
res argument for sending replies. Chain a status code, send data, redirect to another route, or return an error — all callable once.
res:Send · res:Error · res:Status · res:Redirect
→
PUSH
Server Push
Reliable server-to-client events over the same RemoteEvent — no extra setup. Push to one player, a list, or everyone. Received by
listener:On.
app:Push · app:PushAll · app:PushTo
→
isolation
Named Ports
Isolated App instances each with their own RemoteEvent, Router, and TokenBucket. Use them to keep separate systems from sharing rate limit budgets.
app:Listen · app:GetPort
→
See also
Network | client-side counterpart · Router | route pattern syntax · Request Pipeline | how requests flow · TokenBucket | rate limiting · Types | RouteHandler, Request, Response