-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrouter.js
More file actions
34 lines (34 loc) · 1.01 KB
/
Copy pathrouter.js
File metadata and controls
34 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Importing Router Factory
const RouterFactory = require('../library/server/middleware/lib.router.factory');
/**
* @class ApiRouter
* @description This class is responsible for handling the API routes
* @author Dibesh Raj Subedi
* @version 1.0.0
*/
class ApiRouter extends RouterFactory {
/**
* @description Controller Path
* @static
* @memberof ApiRouter
*/
static ControllerPath = "./backend/controllers/api/";
/**
* @description Constructor of ApiRouter Class creating instance of ApiRouter
* @constructor
* @extends RouterFactory
* @param {Server} ServerInstance -> Instance of Express Server from Library
* @memberof ApiRouter
*/
constructor(ServerInstance) {
super(ServerInstance);
this
// Setting Controller Type
.setControllerType("API")
// Setting Controller Path
.setControllerPath(ApiRouter.ControllerPath)
;
}
}
// Exporting the module
module.exports = { ApiRouter };