Initial commit: StreamFlow IPTV platform
This commit is contained in:
commit
73a8ae9ffd
1240 changed files with 278451 additions and 0 deletions
30
desktop-app/update-server.sh
Executable file
30
desktop-app/update-server.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Simple update server for testing auto-update feature
|
||||
|
||||
PORT=9000
|
||||
UPDATE_DIR="./dist"
|
||||
|
||||
echo "🚀 Starting StreamFlow Update Server"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "📁 Serving from: $UPDATE_DIR"
|
||||
echo "🌐 Server URL: http://localhost:$PORT"
|
||||
echo ""
|
||||
echo "The app will check this server for updates."
|
||||
echo "Press Ctrl+C to stop the server."
|
||||
echo ""
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Create a simple HTTP server using Python
|
||||
python3 -m http.server $PORT --directory "$UPDATE_DIR" 2>/dev/null || \
|
||||
python -m SimpleHTTPServer $PORT 2>/dev/null || \
|
||||
node -e "require('http').createServer((req, res) => { \
|
||||
const fs = require('fs'); \
|
||||
const path = require('path'); \
|
||||
const filePath = path.join('$UPDATE_DIR', req.url === '/' ? 'index.html' : req.url); \
|
||||
fs.readFile(filePath, (err, data) => { \
|
||||
if (err) { res.writeHead(404); res.end('Not found'); return; } \
|
||||
res.writeHead(200); res.end(data); \
|
||||
}); \
|
||||
}).listen($PORT, () => console.log('Server running on port $PORT'));"
|
||||
Loading…
Add table
Add a link
Reference in a new issue