You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
727 B
37 lines
727 B
// home.js
|
|
// Copyright (C) 2024 DTP Technologies, LLC
|
|
// All Rights Reserved
|
|
|
|
'use strict';
|
|
|
|
import express from 'express';
|
|
|
|
export default class HomeController {
|
|
|
|
static get isHome ( ) { return true; }
|
|
static get slug ( ) { return 'home'; }
|
|
static get className ( ) { return 'HomeController'; }
|
|
|
|
constructor (dtp) {
|
|
this.dtp = dtp;
|
|
}
|
|
|
|
static create (dtp) {
|
|
const instance = new HomeController(dtp);
|
|
return instance;
|
|
}
|
|
|
|
async start ( ) {
|
|
const router = express.Router();
|
|
this.dtp.app.use('/', router);
|
|
|
|
router.get('/', this.getHome.bind(this));
|
|
|
|
return router;
|
|
}
|
|
|
|
async getHome (req, res) {
|
|
res.locals.pageDescription = 'DTP Chat Home';
|
|
res.render('home');
|
|
}
|
|
}
|