Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/the-noah/json2api
- Owner: The-Noah
- License: mit
- Created: 2020-05-26T00:39:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-08T20:37:56.000Z (about 4 years ago)
- Last Synced: 2024-11-28T14:36:14.157Z (2 months ago)
- Topics: api, api-server, deno, denoland, javascript, json, json-api, rest-api, typescript
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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`.