Spaces:
Sleeping
Sleeping
Download index.js from User-2468/node-hello: direct link, hf CLI and curl.
- Browser
- Download file 341 Bytes
-
https://huggingface.co/spaces/User-2468/node-hello/resolve/main/index.js
- Command line
-
hf download hf://spaces/User-2468/node-hello/index.js
-
curl -L -o index.js https://huggingface.co/spaces/User-2468/node-hello/resolve/main/index.js
341 Bytes
| const http = require("http"); | |
| const PORT = process.env.PORT || 7860; | |
| const server = http.createServer((req, res) => { | |
| res.writeHead(200, { "Content-Type": "text/plain" }); | |
| res.end("Hello from Hugging Face Space with Node.js + Docker!\n"); | |
| }); | |
| server.listen(PORT, () => { | |
| console.log(`Server running at http://0.0.0.0:${PORT}/`); | |
| }); |