14 lines
475 B
JavaScript
14 lines
475 B
JavaScript
var path = require('path');
|
|
const api_version = path.resolve(__dirname, '..').split(path.sep).pop();
|
|
const api_url = path.sep + api_version;
|
|
|
|
module.exports = function (application) {
|
|
|
|
application.get(api_url + '/', function (req, res) {
|
|
application.app[api_version].controllers.site.index(application, req, res);
|
|
});
|
|
|
|
application.get('/', function (req, res) {
|
|
application.app[api_version].controllers.site.index(application, req, res);
|
|
});
|
|
} |