Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krish-r/go-json-placeholder
A simple clone of JSON Placeholder, written in go with chi.
https://github.com/krish-r/go-json-placeholder
Last synced: about 2 months ago
JSON representation
A simple clone of JSON Placeholder, written in go with chi.
- Host: GitHub
- URL: https://github.com/krish-r/go-json-placeholder
- Owner: krish-r
- License: mit
- Created: 2023-01-12T17:56:50.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T18:01:05.000Z (about 2 years ago)
- Last Synced: 2024-06-19T14:26:37.252Z (7 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-json-placeholder
A simple clone of [JSON Placeholder][json_placeholder], written in go with [chi][chi].
## Usage
- Clone the Repository
- Run```sh
# Runs on port 3000
go run .
```## Resources
| | | |
| ----------- | ------- | ----------- |
| `/users` | ✓ | 3 users |
| `/posts` | ✓ | 8 posts |
| `/comments` | ✓ | 12 comments |
| `/albums` | ✗ | |
| `/photos` | ✗ | |
| `/todos` | ✗ | |## Routes
- `/users`
| | |
| -------- | ---------------- |
| `GET` | `/users` |
| `GET` | `/users/1` |
| `GET` | `/users/1/posts` |
| `POST` | `/users` |
| `PUT` | `/users/1` |
| `PATCH` | `/users/1` |
| `DELETE` | `/users/1` |- `/posts`
| | |
| -------- | ------------------- |
| `GET` | `/posts` |
| `GET` | `/posts/1` |
| `GET` | `/posts/1/comments` |
| `POST` | `/posts` |
| `PUT` | `/posts/1` |
| `PATCH` | `/posts/1` |
| `DELETE` | `/posts/1` |- `/comments`
| | |
| -------- | --------------------- |
| `GET` | `/comments` |
| `GET` | `/comments/1` |
| `GET` | `/comments/?postId=1` |
| `POST` | `/comments` |
| `PUT` | `/comments/1` |
| `PATCH` | `/comments/1` |
| `DELETE` | `/comments/1` |[json_placeholder]: https://jsonplaceholder.typicode.com/
[chi]: https://github.com/go-chi/chi