React in realtime

by Jon Erik Solheim
 - 
|API| Tutorials|

spash

Single page applications frameworks (SPA) are at the center stage of modern web development. Top notch web applications depends on fast and responsive behaviour in both user interface and data. Hence the popularity of frameworks like React, Angular, Vue and Ember.

This blog post shows how you can get started with React and restdb.io for development of applications with realtime data.

React is an amazing piece of technology. With it's realtime DOM manipulation and component thinking, it's just a perfect match for realtime enabled databases and frameworks like Firebase, RethinkDB, Pusher and RestDB.io.

In this blog post we'll be developing an application for displaying Nasdaq stock information.

Object relations in a NoSQL database

by Jon Erik Solheim
 - 
|User| API|

relations

Compared to a traditional relational database (SQL), a document oriented (NoSQL) database has poor or non-existent support for relations between objects (data schema). A NoSQL datastore persists and retrieves documents (often in JSON format) and any relationships between your documents is something you must implement yourself.

Without any direct support for relations, you’re stuck with the logic and maintenance of objects / relations in your application layer.

This blog post shows how you can leave the job of maintaining object / relations to a database, effectively giving you time to pick from your backlog instead of adding :)

Email from JavaScript with Gmail and database triggers

by Jon Erik Solheim
 - 
|Tutorials| API|

gmail

This blog post shows you how restdb.io simplifies sending emails via the Gmail mail service. We'll walk through a simple code example with a database trigger (serverless codehook) and a JavaScript that uses the mail API to send an email to a user.

How to automate transactional emails with restdb.io

by Jon Erik Solheim
 - 
|Tutorials| API|

mailimage

Engaging your audience is good for business. Whether your audience are users, subscribers, companies or hot leads, you should have an automated system for keeping them happy.

Sending personal emails based on user actions is an important tool in this aspect.

You can choose from a bunch of excellent email services (APIs) today, e.g. Sendgrid, Mailchimp, Mandrill, Mailgun, Amazon and Mailjet. But there are major challenges in first grasping, and then integrate and automate these services into your application.

This blog post shows how you can automate sending of transactional email directly from a restdb.io application. No need to setup or integrate anything. There is a link to an installable template at the end of the article to get you up to speed quickly.

Send mail from your application

by Jon Erik Solheim
 - 
|Howto| Features| API|

mail Yes, your restdb.io database can now send email.

A simple REST endpoint on your database makes sending email from your application a breeze. A nice responsive HTML email template makes your application emails look great, even on mobile devices.

Hook up with Mailgun

by Jon Erik Solheim
 - 
|Tutorials| API|

We'll soon be entering 2017. And Email is still around.

This blog post shows how you can use a "serverless" Javascript Codehook to send email to people from a web page.

In this example you’ll learn how to use:

  • Mailgun API to send the actual email message
  • Handlebars HTML email template
  • Pages and Codehooks

Are you ready to learn some fun and useful stuff?

Serverless "cron" jobs with JavaScript Codehooks

by Jon Erik Solheim
 - 
|Tutorials| API|

Crontab is a well known workhorse from the Unix and Linux world. 

The crontab is a system that lets you run commands on a regular schedule. Crontab stands for “cron table”, because it uses the job scheduler cron to execute tasks; cron itself is named after “chronos,” the Greek word for time.

Using the Crontab system, restdb.io can invoke a Codehook. A Codehook is a JavaScript function that can access your database or any other network resource.

Combining Crontab and Codehooks puts you in control. It lets you build a more versatile and advanced data backend for your application.

This blog post shows how to get started creating your own Crontab jobs in restdb.io.

Stay in the loop with Codehooks and Slack

by Jon Erik Solheim
 - 
|Integrations| Features| Tutorials| API|

The new restdb.io feature, Codehooks,  lets you execute JavaScripts directly in your database.

This feature opens up an array of cool scenarios for your application.  One of them is to integrate your database with slack.com.

Slack seems to be every team’s favorite collaboration platform now. If you’re not using this great tool already, I would suggest you give it a try. It can practically eliminate the need for sending internal (non-important) emails, and introduces a more human touch to your team information flow.

That’s why it makes sense to let your database talk to Slack, instead of you logging on to your database admin, all the time, to see what’s going on.

This blog post shows you how you can create a JavaScript Codehook to feed your Slack with important stuff that happens inside your database.

You shall not pass - without a JSON Web Token

by Jon Erik Solheim
 - 
|User| Howto| API|


Accessing cloud data sources from JavaScript using AJAX and JSON is at the core of so many applications. There are several complicated approaches and there is JSON Web Tokens.

Thousands of developers have chosen to run their Authentication and Backends from cloud providers for one reason. Simplicity.

Enter JSON Web Tokens, Auth0 and restdb.io. Auth0 lets you set up a world class authentication system in front of your application - in 10 minutes. By using the JSON Web Tokens and the JavaScript API from restdb.io, your data API is easily protected.

After all, your application needs 100% of your attention on the core features, which is everything that happens between authentication and the data store.

You'll find a link to a working application example at the end of this article.

DevOps nirvana: Roll your own low-cost realtime server monitoring with Bash, Javascript and NoSQL

by Jon Erik Solheim
 - 
|Howto| Tutorials| API|

There are plenty of excellent tools to monitor servers in real-time (New Relic, LogicMonitor). These products have tons of features and often costs more than you are (eagerly) willing to pay. Maybe you just need something simple or something custom that you want to keep an eye on in a dashboard. Perhaps the Dev in you is bigger than the Ops? In any of those cases, this article is for you.

We will show how you can use a pre-made restdb.io database template to create your own DevOps server monitoring dashboard with JavaScript, Google Charts and Bash shell scripts. The setup is simple and will only take you a few minutes to try out.

REST API Inspector

by Jon Erik Solheim
 - 
|User| Features| API|


Cloud service APIs can often feel like black boxes. Applications send information in and get responses back, but you feel like being in the dark and don't really see what's going on.  

The new restdb.io REST API Inspector  (  ) will help you to shed more light onto your APIs.

A picture is worth a 1000 lines of code

by Jon Erik Solheim
 - 
|Howto| API|

restdb.io comes with a helpful media archive for documents and images. The media archive also has an API with full CORS support. This is really handy for providing your web application with dynamic content.

In this blog post we'll look at the media archive API and go through a JavaScript code example for a simple (ugly) web page showing the basics of the API.

Make children with the JavaScript API

by Jon Erik Solheim
 - 
|API|

In this blog post we'll show how to create parent-child relations using restdb.io and the JavaScript API. Full source code avaliable at the end.

New restdb.io JavaScript API makes databases more fun for webdevs

by Jon Erik Solheim
 - 
|API|


restdb.io can now autogenerate a complete JavaScript API* for your database. This makes it easy for developers to create web applications with dynamic content. The API also ensures that your code follows the schema for your database. 

Read on for a simple example on how to use the JavaScript API.

Simple real-time chat with streamdata.io and restdb.io

by Knut Martin Tornes
 - 
|Howto| Integrations| API|

restdb.io makes it simple to create a user-friendly, manageable database with a REST-API. For some types of applications, however, you need real-time updates delivered to your front-end web page or mobile app. 

Polling the API from the client could be an option, but often induces too much traffic. Services like Firebase has real-time data, but then you don't get the powerful data manager or the possibility to host web pages in your database like you can in restdb.io. This is where streamdata.io can add to the power of restdb.io. Streamdata.io let's you take any API and create a real-time data source for it!

Real-time is useful for many scenarios like chat, live financial data, games and live maps to mention a few. In this blog post we will show you how easy it is to use streamdata.io with restdb.io by creating a real-time chat running in a restdb.io HTML Page. 

NoSQL aggregations made simpler

by Jon Erik Solheim
 - 
|Howto| API|


An aggregation processes data records and return computed results. With aggregation, you can group values from multiple documents together, and then perform a variety of operations on the grouped data to return a single result. It's perfect for creating reports or gaining more insight from your data.

If you've used MongoDB aggregations, you probably think this is difficult right? 

We'll show you how simple it can be with restdb.io.

Let (the) Postman deliver your REST-API code

by Knut Martin Tornes
 - 
|User| Howto| API|


At restdb.io we have created code examples for various platforms. It's often quite time consuming to find the right library and approach, especially if the programming language is new to you.

But did you know there exists a powerful tool which lets you generate client code for calling REST APIs for many popular languages? Meet (the) Postman.

Prototyping with Framer Studio and random data from restdb.io

by Jon Erik Solheim
 - 
|Howto| Prototyping| API|

In this blogpost we'll demonstrate how you can use restdb.io as a Data Generator for your Framerjs prototype.

I am no expert in how to create prototypes in Framer Studio, and the example is probably amateurish. However, my main goal is to show you how easy it is to connect and work with restdb.io and Framer Studio, almost in real time.

Scoped REST-calls directly from web-pages using CORS

by Knut Martin Tornes
 - 
|API|

Nowadays, most web services offers some form of API-keys to access and update data programmatically. But there's usually a little catch: API-keys are full access and thus only usable from server to server. Some services has started to offer OAuth-access, but that involves some sort of authentication first.


In addition to a full-access API-key, restdb.io lets you add multiple keys with CORS-support. CORS enables javascript-calls directly from a web-page to a server other than the server hosting the page. 

Visualising IoT data with restdb.io pages

by Jon Erik Solheim
 - 
|Howto| API|

We are pleased to share some insights from a project that uses restdb.io as a backend to measure Air quality.

This blogpost shows how you can connect a BeagleBone Black device to restdb.io and how you can visualise the temperature curve on a page served directly from restdb.io. The BeagleBone is a low-cost, community-supported development platform for developers and hobbyists

Parent/child relations made simple

by Knut Martin Tornes
 - 
|Howto| API|

A parent/child-relation is a convenient way of organizing and viewing information in a one-to-many relationship. If you think about it, we use it all the time: 

  • Folders and files on your computer
  • Comments on a blog post
  • Activities on a project
  • Interactions with a customer
Creating this form of relation is very simple in restdb.io. In this blog post we will show you how to add some "Notes" to a "Lead" in a simple CRM system.

Welcome to our Blog - created in restdb.io

by Knut Martin Tornes
 - 
|User| API|

This is our first blog post on restdb.io.
When we started to think about our blog, we had to pick some blog framework or CMS.

But wait, restdb.io is great for serving dynamic content into a web page. Creating a blog is actually a good example that shows the power and flexibility of restdb.io. It's that thing about eating your own dogfood.