untitled-9063
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A client-side web application that polls HTTP endpoints and displays JSON responses in a console-like interface using XMLHttpRequest.
- HTTP Polling: Continuously fetch JSON data from any HTTP endpoint (defaults to
http://127.0.0.1:8080) - Configurable Interval: Adjust polling frequency from 100ms to 10 seconds
- JSON Response Display: Automatically formats and displays HTTP responses
- Console Interface: Terminal-style dark theme with timestamped, color-coded messages
- Request Management: Start/stop polling controls with real-time status indicators
- Statistics Tracking: Counts total requests and errors
- Error Handling: Comprehensive HTTP error handling with status codes
- Clear Console: Reset the message display at any time
- Open the web application
- Enter your HTTP endpoint URL (default:
http://127.0.0.1:8080) - Set the polling interval in milliseconds (default: 1000ms)
- Click "Start" to begin polling the endpoint
- JSON responses will be displayed in real-time in the console
- Use "Clear" to reset the console or "Stop" to halt polling
├── backend/
│ └── index.ts # Hono server that serves the HTML
├── frontend/
│ └── index.html # Main web application with XMLHttpRequest client
└── README.md
- Frontend: Pure HTML/CSS/JavaScript with TailwindCSS for styling
- Backend: Hono server for serving static files
- HTTP Client: Native browser XMLHttpRequest API
- Polling: Configurable interval-based requests
- Error Handling: HTTP status codes, network errors, and timeouts
- Timeout: 5-second request timeout to prevent hanging
- Responsive Design: Works on desktop and mobile devices
The application runs entirely client-side once loaded, making HTTP requests directly from the browser to your specified endpoint.