   routesFile: 'routes.yml'
   codeFilePattern: 'code/**/*.@(coffee|js)'
   i18nFilePattern: 'i18n/**/*.@(yml|yaml)'
-  viewFolderPattern: 'views/*.@(jade)'
-  templateFolder: 'templates/**/*.@(jade)'
+  viewFolderPattern: 'views/'#'views/*.@(jade)'
+  themeFolder: 'themes'
+  theme: ''
   defaultHTTPMethod: '*' # can be get|put|post|delete|patch|all|*(is for all)
   debug: true
   encoding: 'utf8'

_modules = {}
_i18n = {}
_sortedRoutes = []

module.exports = (options = {}, app = null) ->
  exports.setOptions(options)


    # apply views
    viewFiles = glob.sync("#{moduleName}/#{options.viewFolderPattern}")
    views.push(viewFiles[0]) if viewFiles?.length > 0

    #app.set('views',path.dirname(viewFiles[0])) if viewFiles?.length > 0

    # mount to (parent/main) app
    if mountToApp
      mountpoint = if @getConfig()[moduleName]?.mountpoint then @getConfig()[moduleName]?.mountpoint else options.defaultMountpoint
      mountpoint = @_replaceVariableHolder(mountpoint, moduleName)
      mainApp.use(mountpoint, app)

    views.push(themeTemplates[0]) if themeTemplates?.length > 0

    app.set('views', views)

