javascript - Can Qianxue Node solve the problem of self-written interfaces?
PHP中文网
PHP中文网 2017-05-16 13:44:53
0
4
518

I don’t plan to switch to node as the backend, but when I frequently connect, I find that the backend staff are always unhurried and need to be urged, which affects my work rhythm and efficiency. I wonder if after learning node, I can write the interface myself, or will traditional back-end personnel complete the rest?

PHP中文网
PHP中文网

认证0级讲师

reply all(4)
黄舟

The application layer interface can be written, and the basic platform only needs to provide the interface for you. Originally, writing some application layer interfaces is now the responsibility of the front end, and is no longer the responsibility of the back end.

淡淡烟草味

It is recommended to discuss the data format and interface name in advance, and then let the backend provide a json file of fake data accordingly, and then you can use express yourself (of course other methods are also available, this is more convenient), and return the corresponding response according to your request interface json file, you can achieve seamless connection when exporting the directory. Of course, you can also mock the data yourself, but it is not recommended to use mock. I personally feel that it is not necessary.

迷茫

This should be because there is no problem of front-end and back-end separation. If you ask the back-end staff to change the style, it will be painful for you and the back-end staff. So the best way is to separate the front-end and front-end. This is also a trend. node.js can be used as the middle layer of the project

Ty80

If you just want to do interface testing:
You can directly create a json file locally to write test data, and then directly request the json file.
For http service, just use http-server on node.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!