command
Version:
v1.4.0
Opens a new window with list of versions in this module.
Published: Feb 21, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Basic Router Example
This example demonstrates the basic usage of the Dracory HTTP Router package.
Features Demonstrated
- Creating a new router
- Adding routes with shortcut methods
- Creating route groups
- Nested route groups
- Basic request handling
- Exact path matching
Running the Example
- Make sure you have Go installed (1.16 or later)
- Navigate to this directory
- Run the example:
go run main.go
- Open your browser or use
curl to test the endpoints:
http://localhost:8080/hello
http://localhost:8080/api/status
http://localhost:8080/api/users
http://localhost:8080/api/users/123
Endpoints
GET /hello - Simple hello world endpoint
GET /api/status - API status check
GET /api/users - List users
GET /api/users/123 - Get specific user (exact match required)
Code Structure
The example shows:
- Router initialization
- Basic route definition
- Route grouping
- Nested routes
- Exact path matching
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.