简体   繁体   中英

Ruby on rails server response to post request after processing data with java script

Hello fellow developers

I'm building a server for educational purposes. It is a server with ruby ​​on rails and will communicate via request with an android application. The purpose of the whole application is for the user to send his current location and the location he wants to go and the server to respond with data that directs him ("Turn left in n meters"). The problem I'm facing is that all routing ways, from google or open source ways, end up using javascript. I understand that javascript is client side and ror server side.

Is there a way to be able to respond to the application request with the data, after running javascript?

Please understand that it is for editorial reasons and I would prefer to stay on a ror server. It is not necessary for the routing to be done with javascript but I did not find any other way

尝试探索node.js它可能会帮助您将其作为服务器端js。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM