javascript - Can I write the backend interface directly using node to realize the separation of front and back ends? Is this appropriate?
巴扎黑2017-05-16 13:43:58
0
4
588
Bi She plans to do a project like this. I am not very familiar with node, but I feel that the node projects I see all directly render the front-end page. I wonder if this is possible?
Yes, you can use Nodejs+MongoDB+vue+ElementUI, separate the front-end and back-end, and use asynchronous requests to obtain data, which is very convenient.
Yes, it is simple and convenient to write interfaces through nodejs. You can first learn the express framework (simple), and then learn promises or koa after understanding the principles and general structure.
Nodejs makes API, this is definitely possible,
But it depends on the product,
The advantage of nodejs is high concurrency and high IO, but it is not good at high operations,
Of course you can do it even if you are not good at it, but the performance is not as good as php+nginx
It’s absolutely possible, it’s just like writing an interface in Java, open the interface and then transmit it via json
Yes, you can use Nodejs+MongoDB+vue+ElementUI, separate the front-end and back-end, and use asynchronous requests to obtain data, which is very convenient.
Yes, it is simple and convenient to write interfaces through nodejs. You can first learn the express framework (simple), and then learn promises or koa after understanding the principles and general structure.