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

node-rsc

v0.0.5

Published

Really Simple Content Rscuration control for production node deployments

Downloads

12

Readme


RSC - Really Simple Content RSCR - Really Simple Content Routing

VISIONS

  • Really simple content is distributed thru a routing as embedable HTML
** ex.  rsc__get("afelia.logo") =>  "/img/ico/afelia.png"
** ex.  rsc__getLogo("afelia","html") =>  <img src=/img/ico/afelia.png class="rsc_logo afelia.logo">
** ex.  rsc__getLogo("main","html") =>  <img src=/img/ico/afelia.png class="rsc_logo afelia.logo">
** ex.  rsc__getLogo ("afelia","html",false) =>  <img src=http://afelia.jgwill.com/img/ico/afelia.png class="rsc_logo afelia.logo">
** ex.  rsc__getLogo ("","html",false) =>  <img src=http://afelia.jgwill.com/img/ico/afelia.png class="rsc_logo afelia.logo">

ACTIONS

** A Prototype

  • A package Fork compatible as base

Reality

//a file ./rsc/default.json 
var rsc = require('node-rsc');


var cnf = rsc.get("Logos");

console.log(cnf.test);
{
	"Logos": {
		"test": "myval"
	}
}

NPM   Build Status   release notes

Introduction

Node-rsc organizes hierarchical rscurations for your app deployments.

It lets you define a set of default parameters, and extend them for different deployment environments (development, qa, staging, production, etc.).

Rscurations are stored in rscuration files within your application, and can be overridden and extended by environment variables, command line parameters, or external sources.

This gives your application a consistent rscuration interface shared among a growing list of npm modules also using node-rsc.

Project Guidelines

  • Simple - Get started fast
  • Powerful - For multi-node enterprise deployment
  • Flexible - Supporting multiple rsc file formats
  • Lightweight - Small file and memory footprint
  • Predictable - Well tested foundation for module and app developers

Quick Start

The following examples are in JSON format, but rscurations can be in other file formats.

Install in your app directory, and edit the default rsc file.

$ npm install rsc
$ mkdir rsc
$ vi rsc/default.json
{
  // Customer module rscs
  "Customer": {
    "dbRsc": {
      "host": "localhost",
      "port": 5984,
      "dbName": "customers"
    },
    "credit": {
      "initialLimit": 100,
      // Set low for development
      "initialDays": 1
    }
  }
}

Edit rsc overrides for production deployment:

 $ vi rsc/production.json
{
  "Customer": {
    "dbRsc": {
      "host": "prod-db-server"
    },
    "credit": {
      "initialDays": 30
    }
  }
}

Use rscs in your code:

var rsc = require('rsc');
//...
var dbRsc = rsc.get('Customer.dbRsc');
db.connect(dbRsc, ...);

if (rsc.has('optionalFeature.detail')) {
  var detail = rsc.get('optionalFeature.detail');
  //...
}

rsc.get() will throw an exception for undefined keys to help catch typos and missing values. Use rsc.has() to test if a rscuration value is defined.

Start your app server:

$ export NODE_ENV=production
$ node my-app.js

Running in this rscuration, the port and dbName elements of dbRsc will come from the default.json file, and the host element will come from the production.json override file.

Articles

Further Information

If you still don't see what you are looking for, here more resources to check:

Contributors

License

May be freely distributed under the MIT license.

Copyright (c) 2010-2018 Loren West and other contributors