class

Noir::JSHttpRouteExtractor

Inherits Reference < Object

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.

Constants

HTTP_METHODS = Set {"GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE", "QUERY"}
SOURCE_EXTENSIONS = [".js", ".mjs", ".cjs", ".jsx", ".ts", ".mts", ".tsx"]

Class methods

extract(file_path : String, content : String, debug : Bool = false) : Array(Endpoint)
Source
source_file?(file_path : String) : Bool
Source

Nested types