class
Noir::JSHttpRouteExtractor
- Noir::JSHttpRouteExtractor
- Reference
- Object
Overview
Extracts routes from direct Node.js core http/https createServer handlers.
This covers the stdlib shape where applications branch on req.method and req.url/pathname inside a single request listener, rather than registering routes through a framework DSL.
Defined in:
miniparsers/js_http_route_extractor.crConstant Summary
-
HTTP_METHODS =
Set {"GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"} -
SOURCE_EXTENSIONS =
[".js", ".mjs", ".cjs", ".jsx", ".ts", ".mts", ".tsx"]
Class Method Summary
- .extract(file_path : String, content : String, debug : Bool = false) : Array(Endpoint)
- .source_file?(file_path : String) : Bool