The best (well, I think so) Firebase news and articles
|Geoffrey Bourne||Aug 13, 2020||1|
Sorry it has been so long since the last newsletter. My excuse: pandemics, life, etc.
Since last time I’ve been busy. Started a new side project app, got a bunch of paid users, and sold the app. Yeah!
Recently my partner and I started a new platform, called Ayrshare, based on an itch we’ve had. Many times throughout our careers we’ve need to publish event-based posts to social media networks via a backend system. Such news events, stock price movements, or once the top streaming movies (you remember those?). If you’ve ever done this, you know it is a pain. You need to custom building for each network by applying for a dev accounts, getting approval, possibly submitting your app (e.g. Facebook), waiting for approval (or rejection), and then learning the network's specific APIs and building/maintaining - each networks can take hours, days, or even weeks to setup.
So we built Ayrshare as an API-first platform that allows you to send real-time or schedule event-based posts to your social media networks with just a few lines of code. It is built for developers, though there is a very nice GUI to manually schedule posts.
Here is a quick example:
Welcome to check out Ayrshare if you also have a similar issues.
Now onto the show…
Creating Scheduled Cloud Functions
One of the function types I use the most are scheduled functions, which relies upon Google Cloud’s Pub/Sub. This video is a good overview, though a bit monotone. Skip along and you’ll get some nice nuggets. Also, look in the YouTube notes for several good links.
I’ve been thinking about recommending this podcast for a while. It is from the guys who work at Firebase, hosted by David East @_davideast, and they give you some real insights into the inner workings. The first episode was great and more were to come out every week, then month, but second episode never appeared. Thankfully they seem to be going again. If you prefer Spotify use this link.
Security is a little too easy to screw up in Firebase, especially with Firestore security rules. This article isn’t a lesson on create rules, but rather the danger of not.
I’ve become a big fan of Flutter, hence the many articles you see here. Getting signup and auth right is imports. This article give a good overview with the code to get started. By @peterndev
You may have noticed that since Node 10 became the default for Firebase Cloud Functions your
console.log(…) entries in the Firebase console function logs have been a mess. That is a known issue and the recommendation is to use functions logging to output structured logs. While the logs look nice in the Firebase console, your local output will be in JSON format (yuck). Basically I still use console.log for local and the structured logging for production.
That is all for this week and I’ll try to get back on a regular publishing cadence. Also, don’t forget to check out Ayrshare if you want to publish to social networks from a backend system via APIs.