[annotator-dev] Integrating Site With AnnotateIt Store

King'ori J. Maina j at kingori.co
Mon Jul 28 21:25:31 UTC 2014

Hi all,

Figured I’d make a gist on GitHub showing how to integrate AnnotatorJS with the AnnotateIt Store … it’s nothing out of the ordinary.


Regardless, it has two examples (Python and Ruby) for the server side with commentary and it’s overly verbose … I hope this makes it easy for anyone out there who would like a good picture of how everything fits in together. I kinda had to piece things together.

That said, I’m having an issue with CORS … after googling around I found this old 2012 thread … 

[annotator-dev] How to use AnnotateIt.org with Store plugin)

… where Nick actually sorts out the issue server side. So … I guess the problem is on my end … there must be something small I'm missing.


Tested on Chrome 36.0.1985.125 and Safari 8.0 (10538.46)
I get this error “XMLHttpRequest cannot load http://annotateit.org/api/search?limit=20&all_fields=1&uri=http%3A%2F%2Flocalhost%3A4000%2Fexample%2Fpage%2F. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4000' is therefore not allowed access.”
My code is pretty much the same as the code on this  gist on GitHub but with valid credentials and token.
I use the Ruby script to generate a token that is valid for a day … and I set the JS to use the token instead of the URL
My page is running on http://localhost:4000/ …

Ideas are welcome.

Ps: I’ll leave the gist up and update it with anything I learn ...

— King’ori Maina (kingori.co)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20140728/d449ef77/attachment.html>

More information about the annotator-dev mailing list