Hey, I was trying to implement typesense API in th...
# community-help
a
Hey, I was trying to implement typesense API in the frontend. Had two problems while implementing: a. How to hide the API (search key) in the frontend without making any request to the backend. Is there any specific configuration we can do? b. I am calling the API search request in a synchronous function but it won't work as the API request returns a promise and hence to make it work I would need to update my synchronous function to async. Is there a way to make a synchronous call to API for search?
k
1. You can't hide the API key. 2. The JS API only has a promise-based API but @Jason Bosco can confirm if there is an alternative.
j
Confirming that async / promise-based is the only way to use typesense-js. There is no synchronous equivalent