index.js
/**
     * @brief This function sets up the middleware and defines the express
     *        routers before starting the application on the configured port. It
     *        is called after the slack api token is verified.
     *
     * @return none
     */
@brief This function sets up the middleware and defines the express
routers before starting the application on the configured port. It
is called after the slack api token is verified.

@return none
@brief This function sets up the middleware and defines the express routers before starting the application on the configured port . It is called after the slack api token is verified . @return none
function startApp() {
        mongoose.connect(config.db.DB_ADDRESS);
        let app = express();
        app.use(bodyParser.json());
        app.use(bodyParser.urlencoded({extended: false}));
        app.use(slackUtil.checkPostBody);
        app.use(slackUtil.verifyCommandToken);
        app.use(log.logRequest);
        app.use("/", router);
        app.listen(config.PORT, config.IP_ADDRESS, function (error) {
            if (error !== undefined) {
                throw error;
            }
        });
    }
function startApp ( ) { mongoose . connect ( config . db . DB_ADDRESS ) ; let app = express ( ) ; app . use ( bodyParser . json ( ) ) ; app . use ( bodyParser . urlencoded ( { extended : false } ) ) ; app . use ( slackUtil . checkPostBody ) ; app . use ( slackUtil . verifyCommandToken ) ; app . use ( log . logRequest ) ; app . use ( "/" , router ) ; app . listen ( config . PORT , config . IP_ADDRESS , function ( error ) { if ( error !== undefined ) { throw error ; } } ) ; }
@brief This function sets up the middleware and defines the express
        routers before starting the application on the configured port.
@brief This function sets up the middleware and defines the express routers before starting the application on the configured port .
// Connects the app to the mongodb server at the configured address. /* Uses body-parser middleware to parse the given request and populate
         * req.body
         */ // Middleware to check and verify request from slack. // Router middleware for the incoming POST requests. // Start the server on configured address.