version 0.0.2-alpha
A small Deno server framework with built-in caching and optimized performance.
Make sure that you have Deno version 2 or higher installed. Download the source code and place it into the desired folder.
- Simple and intuitive routing
- File serving with automatic MIME type detection
- In-memory caching for improved performance
- Async file handling to prevent blocking the event loop
- Error handling and logging
By default it listens to port 8000, but you can change this by updating the PORT property in the .env file
Open routes.ts and add a new array entry with the following properties:
{
method: "GET", //Or use the RouteMethod enum
path: "/page", //Pathname given after the host (exact match)
response: PageController.show() //Controller with the show function
}For an example see routes.ts and the Home controller
Files are automatically served from the public directory. Place your files in the public directory and they will be accessible at the corresponding URL path.
For example, if you have a file at public/images/logo.png, it will be accessible at /images/logo.png.
The framework automatically detects file extensions and sets the appropriate MIME type.