Download scripts/server.js from SZFSPC/page: direct link, hf CLI and curl.
- Browser
- Download file 298 Bytes
-
https://huggingface.co/spaces/SZFSPC/page/resolve/main/scripts/server.js
- Command line
-
hf download hf://spaces/SZFSPC/page/scripts/server.js
-
curl -L -o server.js https://huggingface.co/spaces/SZFSPC/page/resolve/main/scripts/server.js
298 Bytes
| const http = require('http'); | |
| const PORT = process.env.PORT || 3111; | |
| const server = http.createServer((req, res) => { | |
| res.writeHead(200, { 'Content-Type': 'text/plain' }); | |
| res.end('Hello from Node.js!\n'); | |
| }); | |
| server.listen(PORT, () => { | |
| console.log(`Server running on port ${PORT}`); | |
| }); | |