Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/juanjh1/asimilation/llms.txt

Use this file to discover all available pages before exploring further.

Asimilation

Build powerful Node.js backends with minimal code. Simple routing, flexible middlewares, and TypeScript support out of the box.

Why Asimilation?

Asimilation is designed to be the simplest way to build Node.js backends. No boilerplate, no complexity—just clean APIs for routing and middleware management.

Lightweight

Minimal dependencies and a small footprint. Get started in seconds without the bloat.

Dynamic Routing

Support for static and dynamic paths with parameter types like /<int:id> and /<string:name>.

Flexible Middlewares

Global and route-specific middleware pipeline for authentication, logging, and more.

TypeScript First

Full TypeScript support with comprehensive type definitions for better DX.

Quick Example

Get a server running in just a few lines:
index.ts
import { asi, url } from '@asimilation/core';

// Configure the server
asi.setup(3000, import.meta.url);

// Add a simple route
url.addPath("/", (req, res) => {
  res.sendJson({ message: "Hello from Asimilation!" }, 200);
});

// Add a dynamic route
url.addPath("/user/<int:id>", (req, res) => {
  const userId = req.params.id;
  res.sendJson({ userId, name: "John Doe" }, 200);
});

// Start the server
asi.run();

Key Features

Static & Dynamic Routes

Handle both fixed paths and parameterized URLs with type validation

Middleware Pipeline

Chain middlewares globally or per-route for maximum flexibility

Route Modules

Organize routes into namespaced modules for better structure

Request/Response Helpers

Convenient methods like sendJson() and sendText() for responses

Built-in Middlewares

Logger, timeout, and error handling middlewares included

Type Safety

Full TypeScript definitions for your entire application

Get Started

1

Install the package

Add Asimilation to your project with npm, yarn, or pnpm
npm install @asimilation/core
2

Create your first server

Set up a basic server with routing
import { asi, url } from '@asimilation/core';

asi.setup(3000, import.meta.url);
url.addPath("/", (req, res) => {
  res.sendJson({ status: "ok" }, 200);
});
asi.run();
3

Add middlewares and dynamic routes

Explore the full power of AsimilationRead the Quickstart Guide to learn more

Explore the Documentation

Core Concepts

Learn about routing, middlewares, and the request/response cycle

Guides

Step-by-step tutorials for common use cases

API Reference

Complete API documentation for all exports and types

Built-in Middlewares

Discover the middlewares that come with Asimilation