We have a popular web-app developed using CodeIgniter. Now we want to expose our data through a RESTful API.
Once we are done that we will rebuild the front end such that it merely acts as a client of our API.
People suggested that I should use NodeJS (or similar frameworks like SINATRA) for this API. I have few questions regarding this and I am sure experience devs can help.
If I chose NodeJS where do I put the business logic ? In the NodeJs code itself? Or does NodeJS code merely act like an interface between API clients and business logic implemented in more complicated framework ?
I am assuming here that the existing code is not much reusable.