netlify-json-api

command module
v0.0.0-...-5bddf26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 10 Imported by: 0

README

netlify-json-api

Go Report Card

Publish your data as a RESTful JSON API on Netlify.

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 git@github.com: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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL