Make iodocs module friendly #154

Open
wants to merge 4 commits into
from

Projects

None yet

3 participants

@gergelyke

Make iodocs module friendly, so it can be installed as a dependency: index.js created, so a config file can be injected.

After that, this is possible:

var iodocs = require('iodocs')({
    "title" : "I/O Docs - http://github.com/mashery/iodocs",
    "address": "0.0.0.0",
    "port" : 5000,
    "apiConfigDir" : "../../docs",
    "debug" : false,
    "sessionSecret" : "12345",
    "basicAuth" : {
      "username" : "",
      "password" : ""
    },
    "redis" : {
      "host" : "localhost",
      "port" : 6379,
      "password" : "",
      "database" : "0"
    }
  }
);
@mtougeron mtougeron was assigned Dec 16, 2013
@mtougeron

Let me discuss this with @mansilladev and work out a few things regarding the config changes @rowanhill has proposed first. Primarily I'd like to avoid writing a config file to the filesystem.

@gergelyke

Sure, we can do this in other ways, but my point is to make it useable as a dependency through npm.

@gergelyke

Any updates? Please ping me, if I can help you.

@phairow
phairow commented Oct 9, 2014

@gergelyke it's a great idea to enable loading iodocs as an npm module and config file injected. as @mtougeron mentioned it is not necessary to write the config file this way. I also don't see the need for the index file. changing the portion of app.js that reads the file to ignore that file if config is passed in would be enough. if you want to make those changes we can go ahead and merge this feature. let me know if you have any questions.

@mtougeron mtougeron was unassigned by gergelyke Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment