CloutApiRoutes

CloutApiRoutes

CloutApiRoutes

Constructor

new CloutApiRoutes(app)

Source:
Parameters:
Name Type Description
app object clout instance

Methods

addRoute(CloutApiRouter)

Add CloutApiRouter to router
Source:
Parameters:
Name Type Description
CloutApiRouter object

attachRouterToApp()

Attaches router to clout-app
Source:

initializeAcceptTypeHandler()

Clout-JS handler for custom content requests
Source:

loadAPIFromFile(filePath)

Load APIs from a file
Source:
Parameters:
Name Type Description
filePath string

loadAPIsFromDir(dir)

Finds all the **.js files inside a directory and loads it
Source:
Parameters:
Name Type Description
dir string path containing directory of APIs

loadAPIsFromDirs(dirs)

Finds all the **.js files inside an array of directories and loads it
Source:
Parameters:
Name Type Description
dirs array array of paths containing directory of APIs