Spaces:
Running
Running
Download index.js from veltrixcode/jsondb: direct link, hf CLI and curl.
- Browser
- Download file 725 Bytes
-
https://huggingface.co/spaces/veltrixcode/jsondb/resolve/main/index.js
- Command line
-
hf download hf://spaces/veltrixcode/jsondb/index.js
-
curl -L -o index.js https://huggingface.co/spaces/veltrixcode/jsondb/resolve/main/index.js
725 Bytes
| import express from 'express'; | |
| import canvasRoutes from './routes/canvasRoutes.js'; | |
| import lyricsRoutes from './routes/lyricsRoutes.js'; | |
| import { initPersistentBrowser } from './services/browserAuthService.js'; | |
| const app = express(); | |
| const PORT = process.env.PORT || 7860; | |
| app.use('/api/canvas', canvasRoutes); | |
| app.use('/api/lyrics', lyricsRoutes); | |
| app.listen(PORT, async function () { | |
| console.log("Listening on PORT: ", PORT); | |
| console.log(`Running on local: http://localhost:${PORT}`); | |
| try { | |
| await initPersistentBrowser(); | |
| console.log('Persistent browser initialized successfully.'); | |
| } catch (err) { | |
| console.error('Failed to initialize persistent browser:', err.message); | |
| } | |
| }); |