v0.2.3
API Reference
Complete documentation for the Lesan framework.
Explore server APIs, models, queries, types, and cross-platform guides.
โK
Explore
API Sections
Jump into any section of the API documentation.
Example
Quick Start
Define models and actions in a few lines of code.
example.ts
import { lesan } from "@hemedani/lesan";// Define a modelconst user = core.odm.newModel("user", { name: string(), email: string(),});// Create an actionconst createUser = core.acts.setAct("user", "create", { validator: user.schemaInp(), fn: async ({ body }) => { return await user.insertOne(body); },});// Run the serverawait core.runServer({ port: 1366 });Installation
Install Lesan via your preferred package manager.
bash
npm install @hemedani/lesanRequirements
- โ Node.js 18+ / Bun 1.0+ / Deno 1.35+
- โ TypeScript 5.0+
- โ MongoDB 5.0+
Latest Updates
v0.2.3New query engine, improved type inference, Deno Deploy support.
v1.9Bun adapter optimizations, relation hooks.
Ready to dive deeper?
Start with the Quick Start guide or explore the full API reference.