Contents of this box were generated by the browser by calling OMG.shout()

Click me to regenerate the browser box!


Contents of this box were generated by the server by calling OMG.shout()

OMG! Same code!
Fri Oct 20 2017 03:28:19 GMT+0000 (UTC)

What is this?

During Euruko 2011 the guys from kopfmaschine delivered a talk in which they showed how they used the rubyracer gem to embed the V8 within a Ruby app to share code between frontend and backend.

During the questions somebody asked why they did not use node.js and the answer was that they did not know node.js but they knew Ruby.

As they were finishing the talk I was finishing a simple express-based node.js app which used shared code in the frontend and the backend.

The idea - to show how easy it is to set up. It's far from being perfect, but it shows that if you want shared js code on both sides, node.js is your friend!

And as Heroku launched node.js support I could not think of a better way to celebrate than to put it on Heroku so here it is!

So if you're afraid of node.js, don't be - it will not eat your children.

Fork me on GitHub