1 import Bootstrap from
'../../charging-station/Bootstrap';
2 import express from
'express';
6 app
.get('/', (request
, response
) => {
10 <input type="button" onclick="window.location.href='/start';" value="Start" />
11 <input type="button" onclick="window.location.href='/stop';" value="Stop" />
17 app
.get('/start', (request
, response
, next
) => {
18 Bootstrap
.getInstance().start().catch(next
);
19 console
.log('*** started');
20 response
.send('<b>Started</b><br/><a href="/">Return to Top</a>');
23 app
.get('/stop', (request
, response
, next
) => {
24 Bootstrap
.getInstance().stop().catch(next
);
25 console
.log('*** stopped');
26 response
.send('<b>Stopped</b><br/><a href="/">Return to Top</a>');
29 app
.listen(process
.env
.PORT
?? 8080, () =>
30 console
.log(`Listening on port: ${process.env.PORT ?? 8080}`)