client side javascript mongo