Skip to content

TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.

chore: add extend methods

Nikolai Giman45e4a1160525
diff --git a/api/src/App.ts b/api/src/App.ts
index ceeccfa..b468684 100644
--- a/api/src/App.ts
+++ b/api/src/App.ts
@@ -6,8 +6,6 @@ import errorHandler from './middlewares/error-handler';
import routes from './routes';
import passport, { initPassportLogin } from './tv-modules/auth/strategies/passport-login';
-const VRS = '1.18.0';
-
export default class App {
public app: express.Application;
public port: number;
@@ -16,13 +14,20 @@ export default class App {
this.app = express();
this.port = port;
+ this.extendApp();
+
this.initializeMiddlewares();
this.initializeRoutes();
this.app.use(errorHandler);
this.app.use(passport.initialize());
initPassportLogin();
+
+ this.extendMiddlewares();
}
+ protected extendApp(): void { }
+ protected extendMiddlewares(): void { }
+
private initializeMiddlewares() {
//add tvJson method, clien need response format like {response: data}
this.app.use((_req: Request, res: Response, next) => {
@@ -48,7 +53,6 @@ export default class App {
public listen() {
return this.app.listen(this.port, '0.0.0.0', () => {
console.log(`Server is running on port ${this.port}`);
- console.log(`Server version is ${VRS}`);
});
}
}