export const getBostonWeather = functions.https.onRequest((request, response) => { admin.firestore().doc("cities-weather/boston-ma-us").get() .then(snapshot => { const data = snapshot.data() response.send(data) }) .catch(error => { // Handle the error console.log(error) response.status(500).send(error) }) })