- Add versioning to API endpoints. - Refactored $db and $repos as global variables. - Extracted routes into separate components with deferred registration. - Support for a different db URL for location data than the one used by the application. - Added sqlite and passport dependencies (passport will soon be used to handle authentication).
15 lines
262 B
TypeScript
15 lines
262 B
TypeScript
import { Express } from 'express';
|
|
|
|
import Route from './Route';
|
|
|
|
abstract class Routes {
|
|
public abstract routes: Route[];
|
|
|
|
public register(app: Express) {
|
|
this.routes.forEach((route) => {
|
|
route.register(app);
|
|
});
|
|
}
|
|
}
|
|
|
|
export default Routes;
|