completed JSON api route inorder to render the website client side