Retouch types in server index

This commit is contained in:
Michcio 2022-09-25 18:49:55 +02:00 committed by Johann150
parent f50b04b015
commit 6db9b76f46
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -138,13 +138,13 @@ export const startServer = () => {
return server;
};
export default () => new Promise(resolve => {
export default (): Promise<void> => new Promise(resolve => {
const server = createServer();
initializeStreamingServer(server);
server.on('error', e => {
switch ((e as any).code) {
switch ((e as NodeJS.ErrnoException).code) {
case 'EACCES':
serverLogger.error(`You do not have permission to listen on port ${config.port}.`);
break;
@ -164,5 +164,5 @@ export default () => new Promise(resolve => {
}
});
server.listen(config.port, resolve);
server.listen(config.port, () => resolve());
});