Spaces:
Sleeping
Sleeping
Download index.js from GreenRunchly/SimpleAPI: direct link, hf CLI and curl.
- Browser
- Download file 266 Bytes
-
https://huggingface.co/spaces/GreenRunchly/SimpleAPI/resolve/main/index.js
- Command line
-
hf download hf://spaces/GreenRunchly/SimpleAPI/index.js
-
curl -L -o index.js https://huggingface.co/spaces/GreenRunchly/SimpleAPI/resolve/main/index.js
266 Bytes
| const express = require('express'); | |
| const app = express(); | |
| const PORT = process.env.PORT || 7860; | |
| app.get('/', (req, res) => { | |
| res.json({ message: 'Hello from Node.js API!' }); | |
| }); | |
| app.listen(PORT, () => { | |
| console.log(`Server is running on port ${PORT}`); | |
| }); | |