1 files changed, 9 insertions, 7 deletions
diff --git a/webrtc/src/start.ts b/webrtc/src/start.ts
index f902ec1b..9a5f38ee 100644
--- a/webrtc/src/start.ts
+++ b/webrtc/src/start.ts
@@ -1,11 +1,13 @@
+process.on("uncaughtException", console.error);
+process.on("unhandledRejection", console.error);
+
import { config } from "dotenv";
+import { Server } from "./Server";
config();
-//testing
-process.env.DATABASE = "../bundle/database.db";
-process.env.DEBUG = "mediasoup*"
-
-import { Server } from "./Server";
+const port = Number(process.env.PORT) || 3004;
-const server = new Server();
-server.listen();
\ No newline at end of file
+const server = new Server({
+ port
+});
+server.start();
\ No newline at end of file
|