Move hub endpoint to env variable