add ps2.nice.kiwi as source
This commit is contained in:
parent
b9e2a1879e
commit
2a843d2274
12 changed files with 612 additions and 7 deletions
31
hack/kiwitest/kiwitest.js
Normal file
31
hack/kiwitest/kiwitest.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
const socketio = require("socket.io-client");
|
||||
|
||||
const client = socketio("https://planetside-2-api.herokuapp.com", {
|
||||
transports: ["websocket"],
|
||||
extraHeaders: {
|
||||
Origin: "https://ps2.nice.kiwi",
|
||||
},
|
||||
});
|
||||
|
||||
client.on("connect", (e) => {
|
||||
console.log("Connected to server", { e });
|
||||
client.emit("worlds-update-request");
|
||||
});
|
||||
|
||||
client.on("worlds-update", (e) => {
|
||||
console.log(e);
|
||||
});
|
||||
|
||||
client.on("disconnect", () => {
|
||||
console.log("Disconnected from server");
|
||||
});
|
||||
|
||||
client.on("error", (e) => {
|
||||
console.log({ error: e });
|
||||
});
|
||||
|
||||
client.on("connect_error", (e) => {
|
||||
console.log({
|
||||
connectError: e,
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue