1
0
forked from noxious/server

Server fix (maybe?)

This commit is contained in:
Dennis Postma 2024-08-26 22:18:58 +02:00
parent d7faba056f
commit e069d9293a

View File

@ -103,7 +103,7 @@ export class Server {
if (file.isDirectory()) {
await this.loadEventHandlers(fullPath, socket)
} else if (file.isFile() && file.name.endsWith('.ts')) {
} else if (file.isFile() && (file.name.endsWith('.ts') || file.name.endsWith('.js'))) {
try {
const module = await import(fullPath)
if (typeof module.default === 'function') {