File size: 725 Bytes
537d106
 
22a2b25
537d106
 
 
 
 
 
22a2b25
537d106
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
    }
});