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

dyno-config

v1.0.0

Published

<div align="center"> <img src="https://github.com/picolov/dyno-config/blob/master/dyno.png" alt="Dyno Config Logo" width="200" /> </div>

Readme

Dyno Config

npm version npm downloads License: MIT Bun

A dynamic configuration library that allows runtime updates to configuration values using Redis as a backend.

✨ Features

  • Configuration defined in YAML, JSON, or JSONC files
  • Runtime configuration updates
  • Redis-backed configuration storage
  • Type-safe configuration access
  • Automatic configuration updates through Redis pub/sub
  • Force refresh capability
  • Support both Node and Bun, created using Bun

📦 Installation

npm install --save dyno-config

🚀 Quick Start

  1. First, create a configuration file in your project root. You can use either YAML, JSON, or JSONC format:
# config.yml
feature_flags:
  experimentalFeature: false
  maintenanceMode: false

api_settings:
  timeout: 5000
  retryCount: 3
  baseUrl: "https://api.example.com"
// config.json
{
  "feature_flags": {
    "random": 123,
    "experimentalFeature": false,
    "maintenanceMode": false
  },
  "api_settings": {
    "timeout": 5000,
    "retryCount": 3,
    "baseUrl": "https://api.example.com"
  }
}
// config.jsonc
{
  // Feature flags configuration
  "feature_flags": {
    "random": 123,              // Random number for feature testing
    "experimentalFeature": false,  // Enable experimental features
    "maintenanceMode": false    // Enable maintenance mode
  },
  // API settings
  "api_settings": {
    "timeout": 5000,        // Request timeout in milliseconds
    "retryCount": 3,        // Number of retry attempts
    "baseUrl": "https://api.example.com"  // API base URL
  }
}
  1. Initialize and use the configuration manager:
import { DynamicConfigManager } from 'dyno-config';

// Create the configuration manager
const configManager = new DynamicConfigManager({
  serviceName: 'my-service',
  redisUrl: 'redis://localhost:6379',
  configPath: 'config.json' // optional, defaults to 'dyn-config.json'
});

// Or use an existing Redis client
const redisClient = new Redis('redis://localhost:6379');
const configManager = new DynamicConfigManager({
  serviceName: 'my-service',
  redisClient: redisClient
});

// Initialize the manager (this connects to Redis and loads configurations)
await configManager.initialize();

// Get configuration values
const featureFlags = configManager.get('feature_flags');
console.log(featureFlags.random); // 123

// Listen for configuration updates
configManager.onUpdate((key, value) => {
  console.log(`Configuration ${key} updated to:`, value);
});

// Update a configuration value
await configManager.set('feature_flags', {
  experimentalFeature: true,
  maintenanceMode: false
});

// Force refresh all configurations
await configManager.refresh();

// Clean up when done
await configManager.disconnect();

📚 Examples

Check out the examples folder for complete working examples:

  • node-web-server: A simple web server that uses dyno-config for dynamic configuration
  • Demonstrates how to:
    • Initialize the configuration manager
    • Use configuration values in a web server
    • Update configurations at runtime
    • Handle configuration updates

🔌 Redis Integration

The library uses Redis for:

  • Storing configuration values
  • Publishing configuration updates
  • Subscribing to configuration changes

Configuration keys in Redis follow the pattern: DYNO_CONFIG_<service_name>_<config_key>