Skip to content

Commit

Permalink
Add READNE
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-ta committed Jul 19, 2020
1 parent 38a9b7f commit 63c342a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -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.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"}' 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": "[email protected]"}' 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.

0 comments on commit 63c342a

Please sign in to comment.