UNPKG

flowviz

Version:

A framework which provides seamless integration with other phylogenetic tools and frameworks, while allowing workflow scheduling and execution, through the Apache Airflow workflow system.

53 lines (45 loc) 1.51 kB
/* Api exception custom object */ const ApiException = require("./exceptions/apiException"); /* HTTP requester utility class */ const httpRequest = require("./util/httpRequest")(); module.exports = (app, airflow, passport, production) => { // Library const toolDb = require("./datasources/toolDbDataSource.js")(); const toolService = require("./services/toolService.js")( toolDb, ApiException ); const toolController = require("./controllers/toolController.js")( toolService ); // Workflow const workflowDb = require("./datasources/workflowDbDataSource.js")(); const airflowDataSource = require("./datasources/workflowAirflowDataSource.js")(httpRequest, airflow); const workflowService = require("./services/workflowService.js")( workflowDb, airflowDataSource, toolDb ); const workflowController = require("./controllers/workflowController")( workflowService ); /* Express middleware config */ const exceptionMiddleware = require("./middlewares/exceptionMiddleware")( production ); /* Mongoose error middleware config */ const mongooseErrorMiddleware = require("./middlewares/mongooseErrorMiddleware"); /* Workflow validation middleware config */ const workflowMiddleware = require("./middlewares/workflowValidationMiddleware"); // API's endpoints require("./routes.js")( app, toolController, workflowController, exceptionMiddleware, workflowMiddleware, mongooseErrorMiddleware, passport ); };