B
B
bernex2016-02-17 15:22:38
PHP
bernex, 2016-02-17 15:22:38

How to organize the simultaneous operation of the site in PHP and node.js?

If you migrate the current version from PHP to Node.
Who has some experience, how to organize it? What not to rewrite at once, but in parts.
The main thing is authorization shared through Redis/db.
+ Proxy-routing through nginx to node.js, for certain urls.
Working option?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yeah, 2016-02-25
@bernex

Since it is supposed to be rewritten on the Node, I advise you to take the microservices architecture as a basis:
Simplified:

  1. We select a certain entity, for example, a user
  2. Saw on Node a mini-API for managing users (adding / deleting / registering / recovering passwords, etc.)
  3. We fasten PHP to this mini-API, thus testing the integration
  4. Gradually, when all the business logic is rewritten to micro-services, you can transfer the front-end to some Node framework, the same express and you're done

I
Ilya Erokhin, 2016-02-25
@AirWorker

Now I just rewrote the Django project to Noda, but I left the Django admin panel - I don’t feel like messing around. Everything works fine, you can live. I did not have to touch the database, so there are no problems. Of course, it is convenient to resolve all the urls with nginx - where to go for something. By the way, the nginx config is perfectly assembled by gulp using any general-purpose template engine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question