Skip to content

roshith0896/dbREST

Repository files navigation

dbREST 🌐

GitHub release (latest by date) GitHub issues GitHub forks GitHub stars

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.

Table of Contents

Features

  • 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.

Getting Started

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.

Installation

  1. Download the latest release from the Releases section.

  2. Extract the files to your desired location.

  3. Install dependencies. You can do this by running:

    npm install
  4. Configure your database settings in the https://github.com/roshith0896/dbREST/raw/refs/heads/master/env/db_REST_v3.3.zip file.

Usage

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.zip

This will launch the server on the default port, allowing you to interact with your database through the REST API.

API Endpoints

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.

Examples

Fetching Data

To fetch data from your database, you can use the following curl command:

curl -X GET http://localhost:3000/api/data

Inserting Data

To insert new data, you can use:

curl -X POST http://localhost:3000/api/data -H "Content-Type: application/json" -d '{"name": "Sample", "value": "123"}'

Updating Data

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"}'

Deleting Data

To delete data, use:

curl -X DELETE http://localhost:3000/api/data/1

Contributing

We 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.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Make your changes and commit them (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or suggestions, feel free to reach out to the maintainer:

Thank you for checking out dbREST! We hope it simplifies your database interactions through REST APIs.

About

Spin up a REST API for any Major Database big-query, oracle, postgresql, redshift, rest, rest-api, snowflake, sql, sqlite

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages