Friday 2 June 2017

Migrating separate REST routes from PHP to Node.js/Golang/whatever

At this moment my REST API works on PHP, and is running behind Apache2/Nginx (on Apache2 actually, migration to Nginx is in progress), but after reading about Golang and Node.js performance for rest, i am thinking about migrating my REST from PHP to one of this variants, but where i stuck is how to migrate only some of routes, not whole REST at one.

For example now i have two routes

/users and /articles

apache is listening for 80 port, and then with PHP help return response for them, but what if i want to migrate /articles to Node.js? How my webserver will know what for /articles he need to call Node.js if Node.js will be on different port, but for /users still use PHP?



via MyMomSaysIamSpecial

No comments:

Post a Comment