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

@osmoweb/nestjs-microservice

v0.6.3

Published

This is a NestJS microservice for OsmoWeb

Readme

@osmoweb/nestjs-microservice

NestJS integration layer for OsmoWeb.

This package wires @osmoweb/backend-core into NestJS primitives:

  • A ready-to-import OsmoModule
  • WebSocket gateways for Osmocom bridge flows (control, media, abis_oml, abis_rsl)
  • A small REST controller for per-user BTS config (/api/v1/osmo/bts)
  • Optional background stats polling with writers for InfluxDB / Prometheus Pushgateway

It is designed to run in Node.js.

Install

npm install @osmoweb/nestjs-microservice

Imports (entrypoints)

Subpath exports:

  • @osmoweb/nestjs-microservice — re-exports osmo, and re-exports auth/users from @websdr/nestjs-microservice
  • @osmoweb/nestjs-microservice/osmo — OsmoWeb module (OsmoModule) and tokens
  • @osmoweb/nestjs-microservice/auth — re-exported from @websdr/nestjs-microservice/auth
  • @osmoweb/nestjs-microservice/users — re-exported from @websdr/nestjs-microservice/users

Quick start

In your application module:

import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { OsmoModule } from '@osmoweb/nestjs-microservice/osmo';

@Module({
  imports: [
    ConfigModule.forRoot({ isGlobal: true }),
    OsmoModule,
  ],
})
export class AppModule {}

Configuration (env vars)

OsmoModule provides an OSMO_PARAMS token (type OsmoParams) built from @nestjs/config.

Osmocom service addresses

These keys override defaults from @osmoweb/backend-core:

  • OSMO_SERVER_PORT

Per-service host/port pairs:

  • OSMO_UDP_MEDIA_URI, OSMO_UDP_MEDIA_PORT
  • OSMO_TCP_ABIS_OML_URI, OSMO_TCP_ABIS_OML_PORT
  • OSMO_TCP_ABIS_RSL_URI, OSMO_TCP_ABIS_RSL_PORT
  • OSMO_TCP_HLR_URI, OSMO_TCP_HLR_PORT
  • OSMO_TCP_BSC_URI, OSMO_TCP_BSC_PORT

WebSocket endpoints

Gateways are currently registered with fixed endpoints:

  • /wsdr/osmo/control
  • /wsdr/osmo/media
  • /wsdr/osmo/abis_oml
  • /wsdr/osmo/abis_rsl

Note: OSMO_CONTROL_URI, OSMO_MEDIA_URI, OSMO_ABIS_OML_URI, OSMO_ABIS_RSL_URI are also read into OSMO_PARAMS, but the gateway decorators currently use the hardcoded endpoints above.

Worker pool

  • OSMO_WORKER_POOL_SIZE

REST API

GET /api/v1/osmo/bts

Returns the BTS config/info assigned to the authenticated user.

PUT /api/v1/osmo/bts

Allocates a BTS for the authenticated user (if needed) and updates its config in the BSC via VTY.

Payload is validated using class-validator (see UpdateBtsDto).

Authentication: this controller uses AuthGuard('jwt'). Your application must register a Passport JWT strategy (e.g. by using the auth module from @websdr/nestjs-microservice).

WebSocket bridge

The gateways delegate to @osmoweb/backend-core router controllers.

Important: some flows use a BTS pool loaded from a bts-config.json file in the current working directory (see @osmoweb/backend-core BtsPool).

Stats polling

StatsModule can periodically poll VTY controllers and write metrics.

Enable/disable and interval:

  • STATS_ENABLED (default: true)
  • STATS_INTERVAL_MS (default: 10000)

Writers are enabled only when their env vars are provided:

InfluxDB:

  • INFLUXDB_URL
  • INFLUXDB_ORG
  • INFLUXDB_TOKEN
  • INFLUXDB_BUCKET

Prometheus Pushgateway:

  • PROMETHEUS_PUSH_URL

Compatibility notes

  • TypeScript: ships *.d.ts typings.

Development (monorepo)

From the repository root:

npm install
npm run build
npm test --workspace=packages/nestjs-microservice

From this package folder:

Build

npm run build

Test

npm test

Source links

This package publishes dist/ to npm. Source is available in the GitHub repository:

  • Entry point: https://github.com/wavelet-lab/osmoweb/blob/main/packages/nestjs-microservice/src/index.ts
  • Osmo modules exports: https://github.com/wavelet-lab/osmoweb/blob/main/packages/nestjs-microservice/src/osmo/index.ts

Package folder (GitHub): https://github.com/wavelet-lab/osmoweb/tree/main/packages/nestjs-microservice

License

OsmoWeb is MIT licensed