Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nakkaya/rest-sql
Rest SQL serves a fully RESTful API from a PostgreSQL database.
https://github.com/nakkaya/rest-sql
Last synced: about 1 month ago
JSON representation
Rest SQL serves a fully RESTful API from a PostgreSQL database.
- Host: GitHub
- URL: https://github.com/nakkaya/rest-sql
- Owner: nakkaya
- Created: 2019-06-04T23:43:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-05T11:59:43.000Z (over 5 years ago)
- Last Synced: 2024-10-13T08:13:23.887Z (3 months ago)
- Language: Makefile
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.markdown
Awesome Lists containing this project
README
# Rest SQL
Rest SQL serves a fully RESTful API from a PostgreSQL database.
## Running
### Server
To deploy to a remote server,
```sh
make ansible
```### Locally
To use locally,
```sh
make start
```You can the visit the following URL in a browser on your host machine to get started:
```sh
# Open REST API
http://localhost:9090/# Open database browser
http://localhost:9091/
```## Curl Samples
```sql
create table sensor_values
(epoch timestamp default current_timestamp,
value real not null default 0,
primary key (epoch));
``````sh
curl -s -H "Content-Type: application/json" \
-d '{"value" : "0"}' \
localhost:9090/sensor_values
``````sh
curl -G localhost:9090/sensor_values \
-d select="epoch,value" \
-d order=epoch.desc \
-d limit=10
```