HTTP server with file-based routing for Deno that supports middleware and dynamic routing.
Install Deno 2.5.4+ and run deno init for new projects.
Add Deserve using the deno add command:
deno add jsr:@neabyte/deserveFollow our installing guide for more information.
-
Getting Started
- Installation - Set up Deserve in your project
- Quick Start - Create your first API in minutes
- Server Configuration - Server setup and shutdown
- Custom Configuration - Configure router options
-
Core Concepts
- File-based Routing - How file structure becomes API endpoints
- Route Patterns - Dynamic routes and parameter matching
- HTTP Methods - All supported HTTP methods
- Request Handling - Enhanced request object with automatic parsing
-
Middleware
- Global Middleware - Cross-cutting functionality
- Route-Specific Middleware - Targeted middleware for specific routes
- CORS Middleware - Cross-origin request handling
- WebSocket Middleware - Real-time WebSocket communication
-
Response Utilities
- Data Downloads - Download in-memory content
- File Downloads - Download files from filesystem
- JSON Format - Create JSON responses easily
- Text Format - Plain text responses
- HTML Format - HTML content responses
- Redirect - Redirect responses
-
Static Files
- Basic Static Serving - Serve static files from directories
- Multiple Directories - Serve from multiple locations
-
Error Handling
- Object Details - Detailed error information
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT license. See the LICENSE file for more info.