-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |