An open API service indexing awesome lists of open source software.

https://github.com/o-az/shuttle

JSON share service - Save and share JSONs
https://github.com/o-az/shuttle

json share

Last synced: over 1 year ago
JSON representation

JSON share service - Save and share JSONs

Awesome Lists containing this project

README

          

_❗🚧: This is a playground project at the moment. Don't store anything important here. Any data may be deleted at any time._

# Shuttle 🚀

### JSON share service - Save and share JSONs

### Usage

#### **Markdown render**

_`GET /:id`_ # gets record and renders markdown. Example:

[`https://shuttle.deno.dev/01H6D5KXV3FNDW7CQAABS27W86`](https://shuttle.deno.dev/01H6D5KXV3FNDW7CQAABS27W86)

#### **JSON API**

_`GET /api/:id`_ # gets record. Example:

[`https://shuttle.deno.dev/api/01H6D5KXV3FNDW7CQAABS27W86`](https://shuttle.deno.dev/api/01H6D5KXV3FNDW7CQAABS27W86)

_`POST /api/new`_ # creates new record with JSON body. Example:

```sh
curl --request POST \
--url https://shuttle.deno.dev/api/new \
--data '{"foo":"bar"}'
# returns new record id
```

_`POST /api/new/file`_ # creates new record with JSON uploaded as a file. Example:

```sh
curl --request POST \
--url https://shuttle.deno.dev/api/new/file \
--form 'file=@/path/to/file.json'
# returns new record id
```

_`GET /api/new/:encoded-content`_ # creates new record with base64 encoded content. Example:

[`https://shuttle.deno.dev/api/new/eyJmb28iOiJiYXIifQ==`](https://shuttle.deno.dev/api/new/eyJmb28iOiJiYXIifQ==)

```sh
curl --request GET \
--url "https://shuttle.deno.dev/api/new/$(echo '{"foo":"bar"}' | base64)"
# returns new record id
```

### Stack

- Language: [TypeScript Deno](https://deno.land)
- Storage: [libsql](https://libsql.org)
- Storage Provider: [Turso](https://turso.tech)
- Web Framework: [Hono](https://hono.dev)
- Deployment: [Deno Deploy](https://deno.com)

### License

[GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.en.html)