Spaces:
Runtime error
Runtime error
Download index.js from fffiloni/controlnet-animation-doodle: direct link, hf CLI and curl.
- Browser
- Download file 462 Bytes
-
https://huggingface.co/spaces/fffiloni/controlnet-animation-doodle/resolve/7bf4dfec21c256538091092b467391143ef8a7d0/index.js
- Command line
-
hf download hf://spaces/fffiloni/controlnet-animation-doodle@7bf4dfec21c256538091092b467391143ef8a7d0/index.js
-
curl -L -o index.js https://huggingface.co/spaces/fffiloni/controlnet-animation-doodle/resolve/7bf4dfec21c256538091092b467391143ef8a7d0/index.js
462 Bytes
| 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); | |