https://github.com/satak/deno-rest
Testing Deno as REST API backend
https://github.com/satak/deno-rest
deno rest-api typescript
Last synced: about 1 month ago
JSON representation
Testing Deno as REST API backend
- Host: GitHub
- URL: https://github.com/satak/deno-rest
- Owner: Satak
- License: mit
- Created: 2020-05-12T20:24:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T19:44:06.000Z (about 6 years ago)
- Last Synced: 2025-07-21T09:55:45.406Z (11 months ago)
- Topics: deno, rest-api, typescript
- Language: TypeScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
Deno REST API
Deno REST API server written in TypeScript
-
-
Run deno dev server: `run-deno.ps1`
## Info
- Port: `8000`
- DB: Local JSON file `.\src\db.json`
- Test post request: `post.ps1`
- Main server script: `server.ts`
## Routes
| Route | Method | Info |
| ------------- | ------ | -------------------------------------------------------------------- |
| `/books` | `GET` | List all books in a JSON array |
| `/books/{id}` | `GET` | Get 1 book object by ID |
| `/books` | `POST` | Post new book `{title: string, author: string}` (`application/json`) |