chore: use eventsource polyfil for headers support

This commit is contained in:
thecodrr
2021-10-26 09:36:42 +05:00
parent 657416478e
commit 15954f3d5d
2 changed files with 16 additions and 10 deletions

View File

@@ -1,3 +1,8 @@
import { EventSourcePolyfill as EventSource } from "event-source-polyfill";
//const EventSource = NativeEventSource || EventSourcePolyfill;
// OR: may also need to set as global property
//global.EventSource = NativeEventSource || EventSourcePolyfill;
global.HTMLParser = new DOMParser().parseFromString(
"<body></body>",
"text/html"
@@ -19,16 +24,16 @@ async function initializeDatabase() {
// SSE_HOST: "https://events.streetwriters.co",
// });
// } else {
// db.host({
// API_HOST: "http://localhost:5264",
// AUTH_HOST: "http://localhost:8264",
// SSE_HOST: "http://localhost:7264",
// });
// // db.host({
// // API_HOST: "http://192.168.10.29:5264",
// // AUTH_HOST: "http://192.168.10.29:8264",
// // SSE_HOST: "http://192.168.10.29:7264",
// // });
// db.host({
// API_HOST: "http://localhost:5264",
// AUTH_HOST: "http://localhost:8264",
// SSE_HOST: "http://localhost:7264",
// });
db.host({
API_HOST: "http://192.168.10.29:5264",
AUTH_HOST: "http://192.168.10.29:8264",
SSE_HOST: "http://192.168.10.29:7264",
});
// }
await db.init();