{"size": 703, "ext": "js", "max_stars_repo_path": "docs/app/controllers/api/index.js", "max_stars_repo_name": "stopsopa/ipromise", "max_stars_repo_stars_event_min_datetime": "2016-11-29T09:13:57.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-20T15:25:30.000Z", "max_issues_repo_path": "docs/app/controllers/api/index.js", "max_issues_repo_name": "stopsopa/ipromise", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "docs/app/controllers/api/index.js", "max_forks_repo_name": "stopsopa/ipromise", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.303030303, "max_line_length": 69, "alphanum_fraction": 0.6173541963}

import { Router } from 'express';

import userprovider from './userprovider';

import jwttokenprovider from './jwttokenprovider';

import admin from './admin';

import front from '../../front/controllers';

export default (...args) => {

    const router = Router();

    router.all('/userprovider', userprovider(...args));

    router.all('/jwttokenprovider', jwttokenprovider(...args));
    //
    router.use('/admin', admin(...args));

    router.use('', front(...args));

    router.use((req, res) => {

        // https://expressjs.com/en/guide/routing.html#express-router
        res.statusCode = 500;

        res.end(`Url '${req.url}' don't match any api router`);
    });

    return router;
}