Basic Rerouter is a minimal and lightning-fast server selector that pings your predefined servers and returns the one with the lowest response time. It's ideal for routing requests to the fastest available server dynamically.
-
⚡ Ping-Based Selection – Measures live latency to each server and selects the fastest.
-
🔧 Custom Server List – Easily define multiple servers with custom settings.
-
📊 Flexible Output – Return the best server, all pings, or full metadata.
-
🧘 Lightweight & Fast – Built for speed with minimal overhead and no bloat.
git clone https://github.com/Houloude9IOfficial/basic_rerouter.git
cd basic_rerouter
npm installStart the server with:
npm startOR
npm run startEdit your server list in config.js:
let servers = [
{
name: "Server 1",
url: "https://myserver.onrender.com",
method: "GET",
ping_endpoint: "/ping",
active: true,
show: true,
},
{
name: "Server 2",
url: "https://myserver_1234.dev",
method: "GET",
ping_endpoint: "/ping",
active: false,
show: true,
},
{
name: "Server 3 (Automatically Offline)",
url: "https://myserver_1234.mydomain.com",
method: "GET",
ping_endpoint: "/ping",
active: false,
show: true,
},
{
name: "Server 4 (Hidden)",
url: "https://myserver_abc.mydomain.com",
method: "GET",
ping_endpoint: "/ping",
active: false,
show: false,
},
];-
active: Iffalse, the server is automatically considered offline. -
show: Iffalse, the server is excluded from output.
-
A request is made to
/server -
All active servers are pinged using the specified
ping_endpoint -
Response times are measured
-
Based on query parameters:
-
✅ The fastest server is returned (default)
-
📋 A list of all response times is returned (
?advanced=all) -
📋 A full list including online status, metadata, etc. is returned (
?advanced=full)
/server
| Parameter | Description |
|------------------|--------------------------------------------------|
| (none) | Returns the fastest server only (default) |
| ?advanced=all | Returns all servers with their ping times |
| ?advanced=full | Returns full metadata including status, ping |
GET /server{
"name": "PickRate - Frankfurt",
"url": "https://pickrate.onrender.com",
"status": "Online",
"responseTime": 77
}GET /server?advanced=all[
{
"name": "PickRate - Frankfurt",
"url": "https://pickrate.onrender.com",
"responseTime": 77
},
{
"name": "PickRate - Oregon",
"url": "https://pickrate-oregon.onrender.com",
"responseTime": 236
}
]GET /server?advanced=full[
{
"name": "PickRate - Frankfurt",
"url": "https://pickrate.onrender.com",
"status": "Online",
"responseTime": 77
},
{
"name": "PickRate - Oregon",
"url": "https://pickrate-oregon.onrender.com",
"status": "Online",
"responseTime": 236
}
]/ping
Returns "pong" with or without a random phrase (configured in
config.js)
-
🌍 Dynamic region-based routing
-
🎮 Multiplayer game server selection
-
🧪 Backend testing and latency benchmarking
-
⚙️ Smart endpoint selector for API or edge apps
Stop guessing which server is fastest. Basic Rerouter automatically detects and returns the best option based on real-time latency, allowing your apps to respond faster and smarter — with no extra setup or tools.
Made with care by Houloude9 – because performance should be simple.
MIT – Free to use, modify, improve, or break. Just don’t blame me if your internet isn't fast 😉