The api of web and the api of app are developed separately at the front and back ends.

now web services are developed in a separate way, so I have created a set of api,. Now I want to apply this set of api to app, but there is a gap between some operation modes of app and pc, so how to plan this api is reasonable. I need some advice. Thank you.


my advice is to share the same parts as much as possible, and try to share the different parts of the API, and do it separately. Of course, it also needs the specific situation, specifically, you did not provide a detailed scene, I can only give Fan Fan a relatively general suggestion.


the first api needs to be based on token for access control, not cookie
second, if the system becomes bigger, it is better to set up a layer-one gateway and all the ends are connected to the gateway for unified authentication and then the gateway is responsible for calling the relevant services.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45be6-44b5a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45be6-44b5a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?