File size: 425 Bytes
48e84aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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")
  socket.emit("hello", (process.env.HF_SECRET_VALUE));
});

httpServer.listen(7860);