From 63c342aaa4a631202c65d2df4c761edd246de8c4 Mon Sep 17 00:00:00 2001 From: Andy Ta Date: Sun, 19 Jul 2020 16:27:39 -0400 Subject: [PATCH] Add READNE --- LICENSE.md | 21 +++++++++++++++++++++ README.md | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 LICENSE.md create mode 100644 README.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..bdefde5 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Andy Ta + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9672898 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# AndyDB + +Born out of necessity during a hackathon, AndyDB is a quick-and-easy REST-based NoSQL database inspired by MongoDB. + +AndyDB is still in very early alpha and if you are not in my immediate friend circle then it is not ACID-compliant. + +## Usage + +You can either build the binary yourself with `go build` or [download](https://github.com/mockoon/mockoon/releases) +the release. + +After starting `andydb.exe`, you can make simple RESTful CRUD requests to the server at `http://localhost:42069/api`. + +For example, `curl -d '{"email": "andy@andy.db"}' http://localhost:42069/api/contacts` will create the contacts resource +type (since it does not exist yet) and will save the provided body as an entry of that resource. +It will return with the created object in JSON format, and with a new field `_id`, to be used for future operations. +Subsequent POST requests to the contacts resource will append the entry to the list of contacts. + +With the `_id` you may now perform a GET / PUT / DELETE requests in the format of: + +- GET `http://localhost:42069/api/contacts/{_id}` + - `curl http://localhost:42069/api/contacts/{_id}` +- PUT `http://localhost:42069/api/contacts/{_id}` + - `curl -X PUT -d '{"email": "db@andy.db"}' http://localhost:42069/api/contacts/{_id}` +- DELETE `http://localhost:42069/api/contacts/{_id}` ( + - `curl -X PUT http://localhost:42069/api/contacts/{_id}` + +If you don't provide the id for a GET request, it will return all entries of the resource. + +## Upcoming Features + +- Locking +- Save to file +- Security +- Containerization +- Type checking +- Cleanups by coding in Go better +- Etc. \ No newline at end of file