Yelix: The Modern Web Server Library for Deno
Simplify your backend development with automated features, built-in data validation, and auto-generated API documentation.
import { Yelix } from "jsr:@murat/yelix";
import * as path from "jsr:@std/path@1.0.8";
async function main() {
// Port is 3030 by default
const app = new Yelix();
// Load endpoints from a 'api' folder
const currentDir = Deno.cwd();
const API_Folder = path.join(currentDir, 'api');
await app.loadEndpointsFromFolder(API_Folder);
app.serve();
}
await main();
Powerful Features
Yelix comes packed with features to make your backend development faster and more efficient.
Hono-based Routing
Fast and lightweight request handling powered by the Hono framework.
Data Validation
Automatic query and body validation using Zod schemas.
OpenAPI 3.1
Auto-generates comprehensive API documentation with minimal setup.
Optional Automation
Enable or disable features as needed for your specific project requirements.
Deno-native
Designed specifically for Deno with full TypeScript support.
API Folder Structure
Load endpoints from dedicated folders for better organization.
Code Examples
See how easy it is to build powerful APIs with Yelix.
Basic Route
import { Ctx } from "jsr:@murat/yelix";
export async function GET(ctx: Ctx) {
return await ctx.text('Hello world!', 200);
}
export const path = '/api/hello';
Basic Route with Validation
import { Ctx, ValidationType } from "jsr:@murat/yelix";
export async function GET(ctx: Ctx) {
const requestData = ctx.get('dataValidation').user;
const query = requestData.query;
return await ctx.text('Hello, ' + query.name, 200);
}
export const path = '/api/hello';
export const middlewares = ['dataValidation'];
export const validation: ValidationType = {
query: {
name: inp().string(),
},
};
Get Started
Start building with Yelix in just a few simple steps.
1. Generate Template
deno run --allow-write --allow-read --allow-run https://docs.yelix.dev/yelix-template.ts
2. Run Your App
deno task dev
Documentation
Comprehensive guides and API references to help you build with Yelix.