Skip to content

Instantly share code, notes, and snippets.

const WebSocket = require("ws");
const express = require("express");
const app = express()
const path = require("path")
app.use("/",express.static(path.resolve(__dirname, "../client")))
const myServer = app.listen(9876) // regular http server using node express which serves your webpage
const wsServer = new WebSocket.Server({