forked from FoundKeyGang/FoundKey
Retouch types in server index
This commit is contained in:
parent
7205021d62
commit
5bb2d0f284
1 changed files with 3 additions and 3 deletions
|
@ -138,13 +138,13 @@ export const startServer = () => {
|
||||||
return server;
|
return server;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default () => new Promise(resolve => {
|
export default (): Promise<void> => new Promise(resolve => {
|
||||||
const server = createServer();
|
const server = createServer();
|
||||||
|
|
||||||
initializeStreamingServer(server);
|
initializeStreamingServer(server);
|
||||||
|
|
||||||
server.on('error', e => {
|
server.on('error', e => {
|
||||||
switch ((e as any).code) {
|
switch ((e as NodeJS.ErrnoException).code) {
|
||||||
case 'EACCES':
|
case 'EACCES':
|
||||||
serverLogger.error(`You do not have permission to listen on port ${config.port}.`);
|
serverLogger.error(`You do not have permission to listen on port ${config.port}.`);
|
||||||
break;
|
break;
|
||||||
|
@ -164,5 +164,5 @@ export default () => new Promise(resolve => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
server.listen(config.port, resolve);
|
server.listen(config.port, () => resolve());
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue