JS http route dispatcher