load and apply per app configuration from client/code/<apps>/socketstream.json

npm install ss-localconfigs
8 downloads in the last week
16 downloads in the last month


load and apply per app configuration from client/code/[...APPS...]/socketstream.json


By locating individual socketstream configuration in each client/code subdirectories, we limit the amount of boilerplate code that needs to be added to the main app.js file.

We also make it easier to move apps from one server to another.


In your main app.js of your socketstream application:

var configs = require('ss-localconfigs');
configs.applyConfigs(ss, './client/code', '.socketstream.json');

Configuration file example

An example of configuration file:


  "name": "mc",
  "route": "/",
  "view": "mc.html",
  "css": ["bootstrap"],
  "code": [ 
  "tmpl": "*"

You can omit name and route in which case the directory name is used:


  "view": "app.html",
  "css":  ["app.styl"],
  "code": ["libs/jquery.min.js", "app"],
  "tmpl": "*"


  • convert to coffee and integrate to main socketstream?
  • ignore dot files (make it easier to disable a particular app)
  • add tests
  • detect and abort on conflicting configurations
npm loves you