updated the index.js for autoconfig when loading the module from an app.