If you want to use ionic to complete a webapp for microblog websites, you need to call the api of the website.
The initial assumption is that the background uses node.js to complete token acquisition and accept ajax requests from the front end to return website data. The backstage code is placed on Baidu bae, which means that every time you request the website api in the webapp, you also need to request the address of Baidu bae. Is there any other implementation method?
In addition, where should token information be stored? If you save the database, you need to access the database every time you call token. if you save the database locally, is it appropriate?
The location where the webapp Server runs is the same as the database, which is not open to users, so the security of the two places is the same.
If anyone can hack into your server, your database is also unsafe. However, if the webapp you are referring to is on a mobile phone, it is not safe enough.
Regarding the request, if you don’t want to request two places at the same time, but need to request both places, you can consider taking one of them as an agent. In this way, the client only needs to request one place, and this server requests data from another server.