I would like to connect rails to Intel xdk

0

My final goal is to create an app in xdk that interacts with rails. If nobody knows exactly how it works but give a light on how to access sqlite with ruby and javascript already helps a lot. I have some doubts about the correct way to do this. For example the ideal is to create an initialize in rails? Can not access just with javascript because of the right security? Is there gem for this? Thank you.

    
asked by anonymous 18.04.2016 / 05:30

1 answer

0

Alternatively, you can create a API REST with rails , for example gem grape , and Consume this data via JSON in your Intel XDK application.

As for the security issue, you will need to configure CORS in rails to allow external access . In the example of the link it allows access only via get but you can implement the other methods put, delete, post ....

    
10.09.2016 / 23:23