JS API not working

(John) #1

(I'm very new to JS so you may need to spoon feed me some details :slight_smile: )

I'm trying to write js to query my ES indexes. I've read a ton of material and seen lots of examples but I can't make it work. I'm looking for some working examples and instructions on how to install the required parts to make this work. I already have ES indexes to use so I just need help with my js client.

The following is straight from some examples that I've seen. I keep getting errors like the following but I'm not really sure what to do with this since I can't find any examples using require([])
SCRIPT5022: Module name "scripts/elasticsearch" has not been loaded yet for context: _. Use require([]) http://requirejs.org/docs/errors.html#notloaded

I have a dir structure like

(system) #2