npm installnpm startnpm run dev- Main Website: http://localhost:3000
- Admin Panel: http://localhost:3000/admin
- Username: admin
- Password: phoenix2025
GET /api/queue- Get current song queuePOST /api/request- Submit a song request
POST /api/admin/login- Admin loginPOST /api/admin/logout- Admin logoutGET /api/admin/status- Check auth statusGET /api/admin/requests- Get all requests (including played/deleted)PUT /api/admin/requests/:id/played- Mark request as playedDELETE /api/admin/requests/:id- Delete a request
- Submit YouTube song requests with their name
- View current queue (top 10 songs)
- Real-time queue updates every 30 seconds
- YouTube URL validation
- View all requests (pending, played, deleted)
- Mark songs as played
- Delete inappropriate requests
- Queue statistics
- Secure login system
The system uses SQLite database (radio_requests.db) which is created automatically.
song_requests- Stores all song requestsadmin_users- Stores admin user accounts
- Password hashing with bcrypt
- Session-based authentication
- Input validation and sanitization
- SQL injection protection
- XSS protection through HTML escaping
- Access the admin panel
- Or modify the default password in
server.jsline 35
- Get a YouTube API key
- Update the
getYouTubeTitle()function inserver.js - Install:
npm install googleapis
The SQLite database file radio_requests.db contains all your data. Back it up regularly.
- Port already in use: Change PORT in server.js or set environment variable
- Database errors: Delete
radio_requests.dbto reset (will lose all data) - CORS errors: Check the CORS configuration in server.js
- Session issues: Clear browser cookies or restart server
- Install nodemon:
npm install -g nodemon - Run:
nodemon server.js
PORT- Server port (default: 3000)NODE_ENV- Set to 'production'
- Change the session secret in server.js
- Use HTTPS
- Set secure cookie options
- Use environment variables for sensitive data
- Enable rate limiting
For issues or questions, refer to the code comments in:
server.js- Backend APIscript.js- Frontend JavaScriptadmin.html- Admin interface