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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@meru2802/aux-server

v1.0.14

Published

Nexus EPM auxillary server to facilitate additional functionality required by Scogo Iceberg

Readme

Nexus EPM Auxiliary Server

Nexus EPM auxiliary server to facilitate additional functionality required by Scogo Iceberg.

Features

  • MeshCentral integration for remote device management
  • Device group management
  • Download link generation for mesh agents
  • Connection URL generation for remote access (control, terminal, file system)
  • Health monitoring and status endpoints
  • WebSocket connectivity for real-time communication
  • PostgreSQL database integration

API Documentation

The server includes comprehensive API documentation using Swagger/OpenAPI 3.0.

Accessing API Documentation

Once the server is running, you can access the interactive API documentation at:

  • Swagger UI: http://localhost:3003/docs
  • OpenAPI JSON Spec: http://localhost:3003/docs/json

The Swagger UI provides:

  • Interactive API testing
  • Detailed endpoint documentation
  • Request/response schema definitions
  • Example requests and responses
  • Authentication information

Available Endpoints

Health Endpoints

  • GET /health - Basic health check for load balancers
  • GET /status - Detailed service status including connections and uptime

API Endpoints

  • POST /api/generate-download-link - Generate download link for MeshCentral agent
  • POST /api/generate-connect-urls - Generate authenticated URLs for device access

Core Endpoints

  • POST /core/create-device-group - Create a new device group in MeshCentral
  • POST /core/add-user-to-group - Add multiple users to a device group

Development

Prerequisites

  • Node.js (v18 or higher)
  • pnpm
  • PostgreSQL database
  • MeshCentral server

Installation

# Install dependencies
pnpm install

# Build the project
pnpm run build

# Start the server
pnpm run start

# Development mode with auto-reload
pnpm run dev:watch

Environment Setup

Ensure you have the proper configuration in config.json with:

  • MeshCentral server credentials and encryption keys
  • Database connection settings
  • Iceberg integration endpoints
  • Logging configuration

Database Setup

Run the schema.sql file against your PostgreSQL database to set up the required tables:

pnpm run setup:db

Configuration

The server uses a JSON configuration file (config.json) with the following structure:

  • meshcentralConfig: MeshCentral server connection and encryption settings
  • dbConfig: PostgreSQL database connection settings
  • icebergConfig: Iceberg integration endpoints
  • logging: Logging configuration for file rotation and levels

Usage

Getting a Download Link

curl -X POST http://localhost:3003/api/generate-download-link \
  -H "Content-Type: application/json" \
  -d '{"deviceGroupName": "production-servers"}'

Getting Connection URLs

curl -X POST http://localhost:3003/api/generate-connect-urls \
  -H "Content-Type: application/json" \
  -d '{"meshNodeId": "node//abc123", "userId": "john.doe"}'

Creating a Device Group

curl -X POST http://localhost:3003/core/create-device-group \
  -H "Content-Type: application/json" \
  -d '{"deviceGroupName": "new-group", "description": "My new device group"}'

Adding Users to a Device Group

curl -X POST http://localhost:3003/core/add-user-to-group \
  -H "Content-Type: application/json" \
  -d '{"deviceGroupName": "production-servers", "users": ["john.doe", "jane.smith"]}'

Architecture

The server follows a modular architecture with:

  • Controllers: Handle HTTP request/response logic
  • Services: Business logic and external integrations
  • Routes: API endpoint definitions and middleware
  • Middleware: Request processing, error handling, and validation
  • Types: TypeScript type definitions

Health Monitoring

The server provides comprehensive health monitoring:

  • Basic Health Check: /health - Quick status for load balancers
  • Detailed Status: /status - Complete service information including:
    • Service version and uptime
    • MeshCentral connection status
    • Database connection status
    • External service connectivity

Error Handling

All endpoints return standardized error responses with:

  • HTTP status codes
  • Error messages
  • Timestamps
  • Request correlation information

Security

The server implements:

  • CORS configuration
  • Helmet security headers
  • Request validation
  • Encrypted cookie handling for MeshCentral integration
  • Database connection pooling with proper error handling