<prompt> Tengeneza hati ya Node.js ambayo mara kwa mara huleta data ya bei ya cryptocurrency kutoka API ya umma na kuihifadhi kwenye hifadhidata ya MongoDB. Hati inapaswa kuendeshwa kila baada ya dakika 15 na kuhifadhi bei za hivi punde za Bitcoin, Ethereum, na Litecoin. Tekeleza kushughulikia makosa na uhakikishe kuwa nakala rudufu haziongezwe kwenye hifadhidata.PLINFORMAT  <response>: const axios hitajiaxios;const MongoClient needmongodb.MongoClient;const cron neednode-cron;const mongoUrl mongodb:localhost:27017;const dbName crypto_prices;kazi ya async fetchPrices jaribu const majibu subiri axios.get ; rudisha majibu.data; kukamata kosa console.errorHitilafu katika kuleta bei: error.message; kurudi null; async kazi savePricesbei ikiwa !bei zitarudi; jaribu const client await MongoClient.connectmongoUrl, useNewUrlParser: true, useUnifiedTopology: true ; const db client.dbdbName; const collection db.collectionbei; Angalia nakala rudufu const lastEntry await collection.findOne, sort: _id: -1 ; kama LastEntry lastEntry.bitcoin bei.bitcoin.usd lastEntry.ethereum prices.ethereum.usd lastEntry.litecoin prices.litecoin.usd console.logIngizo rudufu. Kuruka hifadhi.; subiri mteja.funga; kurudi; Hifadhi bei mpya kwenye hifadhidata const result subiri collection.insertOne muhuri wa wakati: Tarehe mpya , bitcoin: bei.bitcoin.usd, ethereum: prices.ethereum.usd, litecoin: prices.litecoin.usd, ; console.logBei zilizohifadhiwa: JSON.stringifyresult.ops0; subiri mteja.funga; kukamata kosa console.errorHitilafu katika kuhifadhi bei: error.message; cron.schedule15 , async console.logInaleta na kuhifadhi bei za sarafu-fiche...; const prices await fetchPrices; subiri savePricesbei;; 