diff --git a/static/search-box.js b/static/search-box.js index 13d9f14..50b11c5 100644 --- a/static/search-box.js +++ b/static/search-box.js @@ -47,7 +47,10 @@ function _codigoparallevar_enable_search_box(selector, options) { const DEBOUNCE_TIME = 500; // Milliseconds const MIN_LENGTH = 3; - const SEARCH_ENDPOINT = 'https://api.codigoparallevar.com/api/search'; + const SEARCH_ENDPOINT = (window.location.host.startsWith('localhost') + ? 'http://localhost:3001/api/search' + : 'https://api.codigoparallevar.com/api/search' + ); let debounceWaiter = null; let currentQuery = null;