简体   繁体   中英

Export ruby middleware to node.js

I'm trying to write server-side logics for Firebase realtime database. Currently they only have sdk support for node.js, but our team previously only work on Ruby. So I'd love to export a bunch of ruby gems that we wrote before and make it work with the node.js.

I'm thinking if there is a way to export ruby code to node.js code so that it can be executed seamlessly with other node.js code.

Currently I only found this repository, but it seems to be importing ruby interpreter and execute ruby code one line at a time, which is not ideal to me, and the repo seems to be outdated too, last commit was 8 years ago.

https://github.com/sinisterchipmunk/node.rb

Is there any solution to this?

There is no way to just easily "export" Ruby code to NodeJS code. They're two completely different languages. It's like asking if you can export Java to Javascript, or vice-versa.

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