Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/poga/netlify-json-api
RESTful JSON API on Netlify
https://github.com/poga/netlify-json-api
json-api netlify restful
Last synced: about 2 months ago
JSON representation
RESTful JSON API on Netlify
- Host: GitHub
- URL: https://github.com/poga/netlify-json-api
- Owner: poga
- License: mit
- Created: 2017-06-06T20:16:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-16T23:44:33.000Z (about 7 years ago)
- Last Synced: 2024-06-20T15:48:50.512Z (6 months ago)
- Topics: json-api, netlify, restful
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# netlify-json-api
[![Go Report Card](https://goreportcard.com/badge/github.com/poga/netlify-json-api)](https://goreportcard.com/report/github.com/poga/netlify-json-api)
Publish your data as a RESTful JSON API on [Netlify](https://netlify.com).
## Install
`go get github.com/poga/netlify-json-api`
## Usage
```
$ netlify-json-api -h
-file string
data file
-host string
host domain
-id string
ID column names (seperate by ",") (default "id")
-out string
output directory
-perPage int
items per page (default 10)
-type string
resource type name
```Use our example:
```
$ git clone [email protected]:poga/netlify-json-api.git
$ cd netlify-json-api/example
$ netlify-json-api -file users.csv -host http://YOUR-NETLIFY-DOMAIN -out out
```Then, deploy `out` to netlify.
Now you have a RESTful JSON API! Try these URLs:
* `GET http://YOUR-NETLIFY-DOMAIN/users.json`
* `GET http://YOUR-NETLIFY-DOMAIN/users.json?page=1`
* `GET http://YOUR-NETLIFY-DOMAIN/users/1.json`## Todos
- [ ] Support other source data. sql? json?
- [ ] Auto deploy to netlify
- [ ] `POST`, `PUT`, and `DELETE` with proxy## License
The MIT License