From: Jérôme Benoit Date: Tue, 12 Apr 2022 16:13:18 +0000 (+0200) Subject: Make the UI pages HTML 4 compliant X-Git-Tag: v1.1.57~9 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=69be24b443f63f167195810792b8dfb70bdfb0ac;p=e-mobility-charging-stations-simulator.git Make the UI pages HTML 4 compliant Signed-off-by: Jérôme Benoit --- diff --git a/src/ui/httpd/start.ts b/src/ui/httpd/start.ts index 28396dfc..7ff8079a 100644 --- a/src/ui/httpd/start.ts +++ b/src/ui/httpd/start.ts @@ -1,31 +1,45 @@ import Bootstrap from '../../charging-station/Bootstrap'; import express from 'express'; +const pageHeader = ` + + + +`; +const pageFooter = ''; + const app = express(); app.get('/', (request, response) => { - response.send(` - -
- - -
- - `); + response.send( + pageHeader + + ` +
+ + +
+ ` + + pageFooter + ); }); app.get('/start', (request, response, next) => { Bootstrap.getInstance().start().catch(next); - console.log('*** started'); - response.send('Started
Return to Top'); + console.info('*** started'); + response.send( + pageHeader + 'Started
Return to Top' + pageFooter + ); }); app.get('/stop', (request, response, next) => { Bootstrap.getInstance().stop().catch(next); - console.log('*** stopped'); - response.send('Stopped
Return to Top'); + console.info('*** stopped'); + response.send( + pageHeader + 'Stopped
Return to Top' + pageFooter + ); }); app.listen(process.env.PORT ?? 8080, () => - console.log(`Listening on port: ${process.env.PORT ?? 8080}`) + console.info(`Listening on http://localhost:${process.env.PORT ?? 8080}`) );