javascript - MongoDB fetch from remote API if document not found -


we're in process of rebuilding our current customer portal scratch. our current portal has bunch of cron jobs sync of our client, contact, , invoice records our whmcs billing system, horrible way it. 1 of our developers has suggested using mongodb cache data pulled via whmcs api, work nicely, suggested remembered having setup mongodb if find id didn't result in page, trigger javascript routine on mongodb go , make api call fetch required record.

that sounded fantastic, after many hours of googling , reading through mongodb documentation, can't life of me find way on mongodb side. coudl php side (especially since we're using yii2), clean solution mongodb side..

hoping perhaps has come across such use case, , can provide example of doing mongodb?


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -