This is an alpha version. Grow with us.

ODB - alpha

A powerful Serverless Backend for your apps

A database will be created linked to your email

A database will be created linked to your email

Your API in three steps

You only have to create a table, insert data using SQLite, and define the schema of your API.

  • Create a table

    CREATE TABLE IF NOT EXISTS friend (
      id INTEGER PRIMARY KEY AUTOINCREMENT,
      name TEXT
    );
    
  • Add some data

    INSERT INTO friend (name) VALUES ('Jennifer');
    INSERT INTO friend (name) VALUES ('Courteney');
    INSERT INTO friend (name) VALUES ('Lisa');
    
  • Define an API

    api:
      service: web-app
      query: SELECT * FROM friend LIMIT COALESCE(@limit, 10)
      method: GET
      path: /friend
      headers: {
        Access-Control-Allow-Origin: '*',
        Access-Control-Allow-Methods: 'GET',
        Cache-Control: 'max-age=3600',
      }
    

Enjoy it ;)

fetch('https://odb.dev/api/friend?limit=2', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  }
});

Wait!!!

There is something else. You can create pages!

Define a Page

page:
  project: web-app
  function: (async () => '<h1>Hello World!</h1>')();
  path: /friend

The Page link

Once you have the created a page, you will have a hash as a unique identifier with the following link:

https://odb.dev/pages/__HASH__/friend