Git Product home page Git Product logo

restabase's Introduction

restabase

REST interface for your SQL database.

restabase uses sequelize ORM and should support all databases sequelize does. NOTE: It has been tested only with MySQL.

##Instructions ###Install Prerequisites: You will need node, npm and git installed.

  1. cd to folder you want to use
  2. clone the repository: git clone https://github.com/marin-liovic/restabase
  3. cd to new restabase folder and run npm install

Run

  1. cd to install folder
  2. edit config files inside /config
  3. run node app.js
  4. optionally you can install forever globally and use it to run restabase: forever start app.js

API

1. GET /meta

  • returns information about all available data endpoints

2. GET /data/{table}

  • returns data from the table
  • accepts query parameter fields to select returning fields; multiple values should be comma separated
  • accepts query parameters offset and limit to support pagination
  • supports equality filtering with query parameters: {field_name}={value}
  • supports operators gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal), ne (not equal), like (SQL like functionality), notLike (SQL not like functionality) with query parameters: {field_name}${operator}={value}

restabase's People

Contributors

marin-liovic avatar tracker1 avatar williamn avatar

Watchers

James Cloos avatar

restabase's Issues

Support singular table name

Background

There are some table that has singular name in my database.

Existing conditions

GET /data/batch will returns

{
    "code": "InternalServerError",
    "message": "ER_NO_SUCH_TABLE: Table 'app_db.batches' doesn't exist"
}

Expected conditions

GET /data/batch should returns data from table batch in JSON format

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.