DZone

React is a declarative, efficient, and flexible JavaScript library for building user interfaces. The CData API Server enables you to generate REST APIs for 80+ data sources, including both on-premises and cloud-based databases. This article walks through setting up the CData API Server to create a REST API for a SQLite database and creating a simple React Web application that has live access to the database data. The React app dynamically builds and populates an HTML table based on the database data. While the article goes through most of the code, you can download the sample React project and SQLite database to see the full source code and test the functionality for yourself.

Setting Up the API Server

If you have not already done so, download the CData API Server. Once you have installed the API Server, follow the steps below to run the application, configure the application to connect to your data (the instructions in this article are for the included sample database), and then configure the application to create a REST API for any tables you wish to access in your React app.

Source: DZone