Spaces:
Sleeping
Sleeping
Download server.js from Reaperxxxx/tzjppp: direct link, hf CLI and curl.
- Browser
- Download file 519 Bytes
-
https://huggingface.co/spaces/Reaperxxxx/tzjppp/resolve/main/server.js
- Command line
-
hf download hf://spaces/Reaperxxxx/tzjppp/server.js
-
curl -L -o server.js https://huggingface.co/spaces/Reaperxxxx/tzjppp/resolve/main/server.js
519 Bytes
| const express = require('express'); | |
| const path = require('path'); | |
| const app = express(); | |
| app.use(express.static('public')); // Serve static files | |
| // Serve manifest.json | |
| app.get('/manifest.json', (req, res) => { | |
| res.sendFile(path.join(__dirname, 'public', 'manifest.json')); | |
| }); | |
| // Default route to index.html | |
| app.get('/', (req, res) => { | |
| res.sendFile(path.join(__dirname, 'public', 'index.html')); | |
| }); | |
| const PORT = process.env.PORT || 7860; | |
| app.listen(PORT, () => console.log(`Server running on port ${PORT}`)); |