Closed mef51 closed 11 years ago
We were discussing about having this all on the client-side. I liked this idea.
I was trying to make ajax requests to partsregistry.org from the client side (all the code in the assets/js
folder) but was getting errors from something called Access-Control-Allow-Origin
. This has something to do with CORS. I was looking around and it seemed like partsregistry itself would have to allow us to make these ajax requests.
Since that wasn't working I moved the searching code from the client to the server (see all the code that is not in assets/js
, namely brickSearchService.coffee) and was able to make requests to partsregistry from there.
I'm not sure why we can make requests to partsregistry from the server but not from the client. They're both "cross-domain" and outside of partsregistry. If anyone can answer this I'll give you a cookie.
The way it is now, the client side will make requests to our server, which will then do the actual search request to partsregistry, and then pass the data back to the client.
The search is implemented by https://github.com/krutkay/igem-bricklayer/pull/8
We need good ways of accessing data from partsregistry.org.
http://partsregistry.org/Registry_API http://igempartview.appspot.com/api.jsp