Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit 8ba90cf

Browse files
committed
optimize code
1 parent 1d41b55 commit 8ba90cf

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/index.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/usr/bin/env ts-node
22

33
import clear from 'clear';
4-
//import process from 'process';
5-
//import exitHook from 'exit-hook';
64
import dayjs from 'dayjs';
75
import weekday from 'dayjs/plugin/weekday';
86
import 'dotenv/config';
@@ -12,28 +10,11 @@ import { Server } from './server';
1210
clear();
1311
console.log('SmartDisplay');
1412

15-
let server: Server;
16-
17-
/*process.on('SIGTERM', code => {
18-
client.publish('awtrix-server', 'exit');
19-
return console.log(`About to exit with code ${code}`);
20-
});*/
21-
22-
//process.stdin.resume(); // so the program will not close instantly
23-
24-
/*exitHook(() => {
25-
console.debug('Exiting');
26-
27-
if (server != null) {
28-
server.shutdown();
29-
}
30-
});*/
31-
3213
const locale = process.env.LOCALE;
3314

3415
import(`dayjs/locale/${locale}`).then(() => {
3516
dayjs.locale(locale);
3617
dayjs.extend(weekday);
3718

38-
server = new Server();
19+
const server = new Server();
3920
});

0 commit comments

Comments
 (0)