File size: 462 Bytes
48e84aa 7bf4dfe 48e84aa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
const express = require("express");
const { createServer } = require("http");
const { Server } = require("socket.io");
const app = express();
const httpServer = createServer(app);
app.use(express.static('public'));
const io = new Server(httpServer, { /* options */ });
io.on("connection", (socket) => {
console.log("hello sockets")
let data = [process.env.URI_ENDPOINT, process.env.HF_TKN]
socket.emit("hello", (data));
});
httpServer.listen(7860);
|