summary refs log tree commit diff
path: root/client.js
blob: 7e8c6d5c311722b621e10c68fefe9bb8e5cce888 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const WebSocket = require("ws");

const ws = new WebSocket("ws://127.0.0.1:8080");

ws.on("open", () => {
	ws.send(JSON.stringify({ req_type: "new_auth" }));
	// ws.send(JSON.stringify({ req_type: "check_auth", token: "" }));
	// op: 0,
	// d: {},
	// s: 42,
	// t: "GATEWAY_EVENT_NAME",
});

ws.on("message", (data) => {
	console.log(data);
});