Custom website - how to link baserow db

Hi, just learned about baserow yesterday. My question:

I have hand coded html/css website and am looking at using baserow as the db. How do I connect baserow db instead of mysql/php? I have a grid of items, including images, dropdown menus to select db items, language switches and more which are all db dependent, etc.

Thanks

Instead of using a database driver like psycopg (note: this is a Python driver for PostgreSQL) and talk to the database through SQL and DDL queries, you would use an HTTP client like requests in Python or Node.js http module to interact with Baserow through HTTP REST API. The API documentation can be found here: Baserow API spec

Thanks @petrs … I see this currently is way beyond me. DBs in general I have no issue with, but it would be great to have some tutorial(s) on this subject.

Can’t let go of the idea of working with baserow. I am still interested in figuring out how to use baserow on a db driven website. And I would be sooo happy, if I could learn how to use it. E.g. I have this new project, currently done with webflow, but I would prefer to keep control of the http/css/js part and connect baserow: https://winecities.winepop.travel. All data on the cards of the startpage are db driven. What do I need to do? Would love a video tutorial, which I think might be of Interest to quite some people.

Hey @DevSpain ,

From the sound of it you currently have a backend written in PHP, is that correct?

This backend probably uses some library to talk to your MySQL database and that’s how you store your data. I assume here that you have written that code yourself.

Now if you want to use Baserow as your database, you will need to replace the code that communicates to your MySQL database with code that communicates with your Baserow instance.

@petrs already linked you the resources you need to understand how to communicate to Baserow.

Instead of using a database driver like psycopg (note: this is a Python driver for PostgreSQL) and talk to the database through SQL and DDL queries, you would use an HTTP client like requests in Python or Node.js http module to interact with Baserow through HTTP REST API. The API documentation can be found here: Baserow API spec

I think this is as clear of an answer as we can give, if you have more detailed questions please feel free to ask them here and we can try to help you in more detail :slight_smile:

Well, @DevSpain mentioned that the original site is actually built with webflow, so I am not sure if we are talking about a custom-build site with a direct db connection.

@DevSpain To build something like that winecities website, you would need to have a Node.js/PHP/other backend application, or build a Single Page Application (SPA) where the data from Baserow would be sourced first and then pushed online as a static content. This is because to retrieve data from any database, you need to securely authenticate with the database and this is not possible to do in front-end only scenario.

I do think that we are really missing some tutorials around interacting with the Baserow API for beginners, that’s clear. Good news is that we are looking for a developer advocate and so I hope we will have much more resources in the future.

2 Likes

Sorry to confuse everyone here. I just gave the site as the one I would like to replace with custom html/css/js and connect to baserow. (Anyway, until I have figured out this connection (basically instead of php/mysql), I’ll have to be patient.) Thanks for your kind attention.