Retouch types in server index

This commit is contained in:
Michcio 2022-09-25 18:49:55 +02:00
parent 7205021d62
commit 5bb2d0f284

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());
});