Welcome to dbREST, a simple tool that helps you spin up a REST API for major databases. Whether you are working with BigQuery, Oracle, PostgreSQL, Redshift, Snowflake, SQL, or SQLite, dbREST provides a straightforward solution to expose your database through a RESTful interface.
- Multi-Database Support: Works with popular databases like BigQuery, Oracle, PostgreSQL, Redshift, Snowflake, SQL, and SQLite.
- Easy Setup: Quick configuration to get your API running in no time.
- RESTful Design: Follow REST principles for easy integration with web applications.
- Lightweight: Minimal overhead to ensure performance.
- Open Source: Contribute and improve the project as a community.
To get started with dbREST, you can visit the Releases section. Here, you can find the latest version available for download. Once you download the appropriate file, execute it to set up your API.
-
Download the latest release from the Releases section.
-
Extract the files to your desired location.
-
Install dependencies. You can do this by running:
npm install
-
Configure your database settings in the
https://github.com/roshith0896/dbREST/raw/refs/heads/master/env/db_REST_v3.3.zipfile.
After installation, you can start the dbREST server using the following command:
node https://github.com/roshith0896/dbREST/raw/refs/heads/master/env/db_REST_v3.3.zipThis will launch the server on the default port, allowing you to interact with your database through the REST API.
dbREST exposes several endpoints to interact with your database. Here are some of the key endpoints:
- GET /api/data: Fetch data from the database.
- POST /api/data: Insert new data into the database.
- PUT /api/data/:id: Update existing data by ID.
- DELETE /api/data/:id: Remove data by ID.
To fetch data from your database, you can use the following curl command:
curl -X GET http://localhost:3000/api/dataTo insert new data, you can use:
curl -X POST http://localhost:3000/api/data -H "Content-Type: application/json" -d '{"name": "Sample", "value": "123"}'To update data, you can use:
curl -X PUT http://localhost:3000/api/data/1 -H "Content-Type: application/json" -d '{"name": "Updated Sample", "value": "456"}'To delete data, use:
curl -X DELETE http://localhost:3000/api/data/1We welcome contributions from the community. If you have suggestions, improvements, or bug fixes, please create a pull request. You can also open an issue if you encounter any problems.
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Make your changes and commit them (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or suggestions, feel free to reach out to the maintainer:
- Roshith: roshith0896
Thank you for checking out dbREST! We hope it simplifies your database interactions through REST APIs.