npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@teliagen/server

v0.4.2

Published

HTTP server and application runtime for Teliagen

Readme

@teliagen/server

The core HTTP runtime and application orchestrator for Teliagen.

@teliagen/server provides the backbone for building scalable, type-safe, and federated Node.js applications. It replaces traditional controllers with a robust Action-based architecture and manages the entire application lifecycle.

npm version License

Features

  • TeliagenApp: A unified application class handling configuration, plugins, and server lifecycle.
  • Action System: Route requests directly to typed Action Providers (no manual router configuration needed).
  • Federation Ready: Built-in TeliagenHost for orchestrating microservices and gateway patterns.
  • Plugin Architecture: Deep integration points for authentication, database adapters, and custom logic.
  • Performance: Lightweight HTTP transport layer optimized for high throughput.

Installation

npm install @teliagen/server @teliagen/commons

Note: This package requires reflect-metadata to function correctly with decorators.

Quick Start

Create a simple API with a single action:

import 'reflect-metadata';
import { TeliagenApp } from '@teliagen/server';
### 1. Define Input Schema (`src/modules/hello/schemas/hello.schema.ts`)

It is recommended to define schemas in separate files using the `@Schema` decorator for better organization and automatic client generation.

```typescript
import { Schema } from '@teliagen/commons/schemas';
import { String } from '@teliagen/commons/validation';

@Schema()
export class HelloInput {
  @String()
  name!: string;
}

2. Define Action Provider (src/modules/hello/actions/hello.actions.ts)

import { Action, ActionProvider, Input } from '@teliagen/commons/actions/decorators';
import { HelloInput } from '../schemas/hello.schema.js';

@ActionProvider({
  module: 'hello',
  name: 'HelloActions'
})
export class HelloActions {
  
  @Action('world')
  async world(@Input(HelloInput) input: HelloInput) {
    return { message: `Hello ${input.name} from Teliagen!` };
  }
}

3. Start Server (src/server.ts)

import 'reflect-metadata';
import { TeliagenApp } from '@teliagen/server/app';
import { HelloActions } from './modules/hello/actions/hello.actions.js';

const app = new TeliagenApp({
  server: { port: 3000 }
});

// Register module containing actions (optional)
app.registerModule({
  actions: [HelloActions]
});

await app.start();
console.log('Server running on http://localhost:3000');

Core Concepts

TeliagenApp

The TeliagenApp class is your entry point. It can be configured via code or primarily through teliagen.config.ts.

const app = new TeliagenApp();
await app.initialize(); // Auto-loads teliagen.config.ts
await app.start();

Routing & Actions

Unlike Express or Fastify, you don't define routes manually. Teliagen routes are derived from the Action Provider metadata.

  • Module: The namespace of the provider (e.g., auth, users).
  • Provider: The class name (e.g., UserActions).
  • Action: The method name (e.g., create).

This structure allows the Client Generator (@teliagen/vite-plugin) to create fully typed SDKs for your frontend automatically.

Federation (TeliagenHost)

For microservices, use TeliagenHost to act as a gateway that stitches multiple remote or local Services into a single Unified Graph.

import { TeliagenHost } from '@teliagen/server';

const host = TeliagenHost.getInstance();
await host.setup(); // Loads services from config
await host.start(8080);

Documentation

For comprehensive guides, API references, and advanced usage (Middlewares, Guards, Interceptors), please visit:

docs.teliagen.org

License

Apache-2.0