- Created a basic Socket.IO server that manages user connections and queues for events. - Implemented queue logic to handle concurrent user limits and JWT token issuance. - Added MySQL configuration for potential persistence of queue positions. - Introduced environment variables for configuration through a .env.example file.
18 lines
309 B
Plaintext
18 lines
309 B
Plaintext
# Socket server
|
|
SOCKET_PORT=4000
|
|
NEXT_PUBLIC_SOCKET_URL=http://localhost:4000
|
|
|
|
# Queue settings
|
|
QUEUE_THRESHOLD=100
|
|
CONCURRENT_ACTIVE=50
|
|
TOKEN_TTL_SECONDS=900
|
|
|
|
# JWT
|
|
JWT_SECRET=your_jwt_secret_here
|
|
|
|
# MySQL (optional)
|
|
MYSQL_HOST=localhost
|
|
MYSQL_USER=root
|
|
MYSQL_PASSWORD=yourpassword
|
|
MYSQL_DATABASE=queue_demo
|