简体   繁体   中英

Saving data from 3rd party API to CouchDB using AngularJS

I have a working frontend app build with AngularJS. It interacts with a couple of 3rd party APIs and is getting data without a problem.

The next step of the app would be to store this data into a CouchDB everytime a search is made. I want to build my own db little by little and to eventually rely on it and not on the 3rd party API (eg, the app first makes a query to my database, if it doesnt find what's needed, takes it from the 3rd party API, displays it on the frontend but it also saves it on my database, so next time the same search is conducted, the results will come from my resource).

Do I need to use nodejs and some module (express, nano, etc) or can I rely only on AngularJS to write data to the DB?

CouchDB has a simple REST interface that you can call directly from AngularJS. There's a Angular module for it as well called CornerCouch

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM