/nutshttp

A http server for nutsdb

Primary LanguageGo

nutshttp

A http server for nutsdb

Example

Run http server and listen ON ":8080".

go run examples/hello.go

Check example data

# Get all members in set
curl http://localhost:8080/set/bucket001/foo


# List all list
curl http://localhost:8080/list/bucket001/key1?start=0&end=10

Auth

  1. Enable Auth:
nutshttp.EnableAuth = true
  1. Create Token:
curl http://127.0.0.1:8080/auth/thisisacert

thisisacert replace with your pwd or username

  1. Use Token:
  • Add token to HEADERS:

    Authorization : Bearer <token>