Category: Code

CSS Naming Conventions that Will Save You Hours of Debugging

Ohans Emmanuel: I have heard lots of developers say they hate CSS. In my experience, this comes as a result of not taking the time to learn CSS. CSS isn’t the prettiest ‘language,’ but it has successfully powered the styling of the web for over 20 years now. Not doing too badly, huh? However, as you write more CSS, you quickly see one big downside. It is darn difficult to maintain CSS. Poorly written CSS will quickly turn into a nightmare. Ohans makes some interesting points about about CSS conventions such as the use of BEM naming convention (Body, Elements,

Read More »

Scan your projects for crossenv and other malicious npm packages

Dominik Kundel, writing for the Twilio Blog: On August 1st, Oscar Bolmsten tweeted about how he found a malicious npm package called crossenv that scans for environment variables and POSTs them to a server. This is particularly dangerous considering that you might have secret credentials for different services stored in your environment variables. Apparently it’s also not limited to just crossenv, but a series of packages — all of them are names of popular modules with small typos such as missing hyphens. Check your project for malicious packages These packages have been taken down by npm, but since credential theft happens

Read More »

Introducing outgoing webhooks

Today we’re announcing outgoing webhooks – a long awaited feature that will notify your websites and apps whenever data changes occur. This opens up a new range of possible integrations Adding outgoing webhooks means you can get notified directly in slack or elsewhere when new records are added, when records are updated or deleted. To create an outgoing webhook, just click webhooks in the dropdown: Then edit the form: Hit Save and when you save a new record with our API, we will send notifications to your webhook instantly. We’ve got some options for how we send the data, you

Read More »

Build a “Serverless” Live Blog System with Flybase, Twilio and StdLib

Flybase and Twilio work great together, we’ve posted several posts before about using these two services in one place, but what about if you want to go serverless? StdLib.com is excellent for that. In their own words, StdLib is essentially a package manager for APIs that’s built upon new “serverless” architecture, meaning you never have to worry about managing servers or allocating resources for scale. All you have to do is write a function or two (or three), deploy, and you’re done, and this is perfect for quickly building services with Flybase. We’ve covered building a Live Blogging tool before,

Read More »

How to fix errors in production with GitHub and Sentry

Sometimes bugs slip through even the most diligent of code reviews. Putting out fires can disrupt your flow, forcing you to comb through logs and user-submitted screenshots. In the meantime, your users are left with an enigmatic 500 page. To help your team get from error to fix as efficiently as possible, try Sentry — an open source project under the BSD license. Sentry alerts you to the problematic line of code, pinpoints the commit and author likely responsible, and lets you resolve the error by including fixes ISSUE_ID in your commit message. It starts with an overlooked edge case

Read More »

Healthchecks and Heartbearts

Most web apps set up a healthcheck, it’s usually an endpoint that tells you that your databases are up, and websites are up. I’ve even got a repo ready to go that I install on servers and enable quickly, based on another middleware healthcheck but with a few changes to make it easier to use, and with endpoints already in place for mongodb, redis and elasticsearch if needed. We use healthchecks heavily here at Flybase to monitor all our services and let us know in case of any issues. These work great, if one thing goes down then your monitor

Read More »

Build a Status Page powered by Github and Uptime Robot

This post was originally posted on Coded Geekery, my personal blog about finding a work-life balance, but I wanted to share it here as well since it’s about the Flybase status page. Overview We built our own status page for Flybase, you can see it here. It was built as a static HTML page on Github Pages. It uses Github Issues to report any incidents and Uptime Robot to monitor our sites. This idea is based loosely on the statuspage repo created by @pyupio, but simplified, as I wanted this to be pretty much automated, plus we already use Uptime

Read More »

Build a real-time SMS group chat tool with Flybase, Twilio, Node.js and Heroku

This is an update to our original Post about building a group chat tool. Some things remain the same, but we’ve updated the library to Flybase (finally) and also removed the ngrok section for Heroku. Overview Last November, I went to a conference with several co-workers, and we wanted to keep everyone organized so we could keep track of what our plans were. We set up a group chat system that let one of the members send an SMS and everyone else get the message, then if someone replied, we’d all see the reply. That was handy, and today, I’m

Read More »

Manage Your Data With Indexes

We’ve mentioned before about our roll out of nextgen features, and we are starting to roll these out now. We’ve rolled out the queues, and now this week we’ve launched our schema builder. This is a very basic schema builder, after you’ve added a few records to a collection, you can set rules for each field, such as field types (number, string or mixed), index rules such as unique or required (or unique and required). This gives you more control over your data, and also cuts down on doing things like searching to see if a record exists before adding

Read More »

Queuing It Up With Flybase Simple Queues

Queues are handy for processing items in the background, you just send an item to the queue and have a worker in the background to do something with it and remove it from the queue. You can even have multiple workers running Flybase is great for setting up queues, but we wanted to make it even better (and simpler) so we built our Queue system. Adding items to a queue is simple, you just have to use the enqueue function, available in our latest javascript and node libraries: var ref = new Flybase(“YOUR-FLYBASE-APIKEY-OR-TOKEN”, “web”, “posts”); ref.enqueue({ username: ‘Joe’, message: ‘Hello’,

Read More »

Flybase helps you build real-time, collaborative apps in a fraction of the time with our API. Flybase lets you create fully interactive apps with just frontend code. Learn More