DTP Base provides a scalable and secure Node.js application development harness ready for production service.
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.
 
 
 
 

24 lines
686 B

// index.js
// Copyright (C) 2024 DTP Technologies, LLC
// All Rights Reserved
'use strict';
const DTP_COMPONENT_NAME = 'DtpChat';
const dtp = window.dtp = window.dtp || { };
import { TimeTrackerApp } from './time-tracker-client.js';
import DtpWebLog from 'lib/dtp-log.js';
window.addEventListener('load', async ( ) => {
dtp.log = new DtpWebLog(DTP_COMPONENT_NAME);
dtp.env = document.body.getAttribute('data-dtp-env');
dtp.app = new TimeTrackerApp(dtp.user);
dtp.log.info('load handler', 'application instance created', { env: dtp.env });
await dtp.app.startAudio();
dtp.log.debug('load', 'dispatching load event');
window.dispatchEvent(new Event('dtp-load'));
});