Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/the-noah/json2api

Turns JSON files into a simple API
https://github.com/the-noah/json2api

api api-server deno denoland javascript json json-api rest-api typescript

Last synced: 3 days ago
JSON representation

Turns JSON files into a simple API

Awesome Lists containing this project

README

        

# json2api

Turns JSON files into a simple API.

```bash
# run downloaded repo
$ deno run --allow-net --allow-read=data --allow-env app.ts

# run without downloading
$ deno run --allow-net --allow-read=data --allow-env https://denopkg.com/The-Noah/json2api/app.ts
```

Serves JSON files in `data` under their filename, and supports getting a specific item by id or array index.

`/cats` will return `data/cats.json`.

`/cats/1/` will return object with `id: 1` in `data/cats.json`.