123456789101112131415161718192021222324252627282930313233343536 |
- const express = require('express');
- const router = express.Router();
- var path = require('path');
- const RoutingSystem = require('./RoutingSystem');
- let mainroutes = [
- {
- type: 'file',
- method: 'get',
- endpoint: '/',
- file: '/index.html'
- },
- {
- type: 'custom',
- method: 'get',
- endpoint: '/test',
- customFn: (req, res) => {
- res.send("ASDSADSDA");
- }
- },
- ];
- class AdminSystem {
- constructor() {
- this.router = router;
- this.createSetupRoutes();
- }
- createSetupRoutes() {
- RoutingSystem.loadRoutes(mainroutes, this.router, '/admin');
- }
- }
- module.exports = new AdminSystem();
|