Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neelr/gojson
A simple, lightning fast, instant database in Golang
https://github.com/neelr/gojson
api database golang json
Last synced: about 3 hours ago
JSON representation
A simple, lightning fast, instant database in Golang
- Host: GitHub
- URL: https://github.com/neelr/gojson
- Owner: neelr
- License: mit
- Created: 2020-04-17T19:37:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-19T07:36:40.000Z (over 2 years ago)
- Last Synced: 2024-06-21T04:46:11.225Z (5 months ago)
- Topics: api, database, golang, json
- Language: Go
- Homepage: https://db.neelr.dev/
- Size: 189 KB
- Stars: 40
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goJSON
[![Run on Repl.it](https://repl.it/badge/github/neelr/gojson)](https://repl.it/github/neelr/gojson)
A simple and lightning fast database written in Golang!
This api is meant for small projects that just need a fast database, and dont want to mess around with tokens and setting one up yourself! Just copy the link, and use the API methods to store and retrieve any JSON you need!
Open Source and accepting contributors!
## API
**UPDATE**: To check the magnitude of requests, I made an open source log for the API. Check at https://db.neelr.dev/logs. It only tracks the number of requests, not IP's or anything else.
Use the UI to take a look at your token's database: https://dash.db.neelr.dev
Your very own database API endpoint is `/api/:key`
### Add/Update Data
**POST** or **PUT** `/api/f0e4408dc81b90365ed5b11112ff2575`!
Also you can update inner objects using keys!
ex. POST `/api/f0e4408dc81b90365ed5b11112ff2575/hello/hi`
```json
{
"go": true
}
```will update it to create a JSON
```json
{
"hello": {
"hi": {
"go": true
}
}
}
```**IMPORTANT UPDATE:**
Take note that **PUT** method only updates, and does not delete any keys in the database when writing, while **POST** overwrites any existing keys in the same directory. For the example above both work, but instead, if there were other values at /hello/hi **POST** would overwite all of them with `go:true`### View Data
**GET** `/api/f0e4408dc81b90365ed5b11112ff2575` or navigate through the keys with `/api/f0e4408dc81b90365ed5b11112ff2575/hello` would return
```json
{
"hi": {
"go": true
}
}
```### Delete Data
**DELETE** `/api/f0e4408dc81b90365ed5b11112ff2575` and you can delete using the same key navigation given above!
## Building and Running
1. Install Golang on your computer
2. Run `git clone https://github.com/neelr/gojson`
3. Create an empty `database` folder
4. Go into the directory and run `go run .`!
## Contribution
Any type of feedback, pull request or issue is welcome.
**MIT LICENSE**