init
This commit is contained in:
12
src/routes/index.js
Normal file
12
src/routes/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
const express = require('express');
|
||||
const ServiceManager = require('../service');
|
||||
const versionList = ['v1'];
|
||||
|
||||
module.exports = app => {
|
||||
versionList.map(version => {
|
||||
const path = '/' + version.replace('/', '');
|
||||
app.use(path, ServiceManager.mountService(express.Router(), version));
|
||||
});
|
||||
return app;
|
||||
};
|
||||
Reference in New Issue
Block a user