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.
I’m not sure if NodeJS is the right tool to use in this case (sure, it’s cool to say “use nodejs” these days, but unless the tool fits the need, don’t use it).
Have you looked at REST frameworks for PHP that are out there? e.g. FAPI
EDIT: You should also read: https://stackoverflow.com/questions/238125/best-framework-for-php-and-creation-of-restful-based-web-services