https://github.com/scottgriv/go-json_task_manager_api
This is a simple Task Manager API written in Go. The API provides basic CRUD (Create, Read, Update, Delete) functionality to manage tasks. Tasks are saved in a tasks.json file for persistence.
https://github.com/scottgriv/go-json_task_manager_api
api go json notes notes-app notes-application notes-taking-app notes-tool
Last synced: about 2 months ago
JSON representation
This is a simple Task Manager API written in Go. The API provides basic CRUD (Create, Read, Update, Delete) functionality to manage tasks. Tasks are saved in a tasks.json file for persistence.
- Host: GitHub
- URL: https://github.com/scottgriv/go-json_task_manager_api
- Owner: scottgriv
- License: unlicense
- Created: 2023-08-10T00:45:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-09T04:12:35.000Z (4 months ago)
- Last Synced: 2025-03-28T18:32:32.394Z (about 2 months ago)
- Topics: api, go, json, notes, notes-app, notes-application, notes-taking-app, notes-tool
- Language: Go
- Homepage:
- Size: 379 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 Task Manager API
This is a simple Task Manager API written in Go. The API provides basic CRUD (Create, Read, Update, Delete) functionality to manage tasks. Tasks are saved in a tasks.json file for persistence.
---------------
## Table of Contents
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Usage](#usage)
- [Testing](#testing)
- [What's Inside?](#whats-inside)
- [Resources](#resources)
- [License](#license)
- [Credits](#credits)## Getting Started
### Installation
1. Clone the Repository:
```bash
git clone https://github.com/scottgriv/go-json_task_manager_api
```2. Change to the Directory:
```bash
cd go-json-task-manager-api
```3. Run the Server:
```bash
go run .
```
4. The server should now be running on http://localhost:8080.### Usage
```GET /tasks: Retrieve a list of all Tasks.```
Response:
```json
[
{ "id": 1, "name": "Sample Task" },
{ "id": 2, "name": "Modified Task" }
]```
```POST /task/create: Create a new Task.```
Body:
```json
{
"name": "Your Task Name"
}
``````DELETE /task/delete: Delete a Task by its ID.```
Body:
```json
{
"id": 1
}
``````PUT /task/update: Update an existing Task by its ID or create a new one if it doesn't exist.```
Body:
```json
{
"id": 1,
"name": "Updated Task Name"
}
``````PATCH /task/modify: Update specific fields of an existing Task by its ID.```
Body:
```json
{
"id": 1,
"name": "Modified Task Name"
}
```### Testing
Use a tool like [Postman](https://www.postman.com/) or [curl](https://curl.se/) to send requests to the server and test each endpoint. You can also import the included Postman collection in the [api](api) directory to get started.
## What's Inside?
```bash
go-json_task_manager_api/ # Root directory
├── main.go # Entry point
├── router.go # Routes
├── handlers.go # Request handlers
├── tasks.go # Task model
├── postman/ # Postman collection
│ └── go-json_task_manager_api.postman_collection.json # Import this file into Postman
├── sample/ # Sample data
│ └── tasks_sample_output.json # Sample output from GET /tasks
├── tasks.json # Tasks data file
├── .gitignore # git ignore file
├── LICENSE # License file
└── README.md # This file
```## Resources
- [Go](https://golang.org/)
- [Go Documentation](https://golang.org/doc/)
- [Go by Example](https://gobyexample.com/)
- [Go Tutorial](https://www.golangtutorial.dev/)## License
This project is released under the terms of **The Unlicense**, which allows you to use, modify, and distribute the code as you see fit.
- [The Unlicense](https://choosealicense.com/licenses/unlicense/) removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
- For more details, see the [LICENSE](LICENSE) file in this repository.## Credits
**Author:** [Scott Grivner](https://github.com/scottgriv)
**Email:** [[email protected]](mailto:[email protected])
**Website:** [scottgrivner.dev](https://www.scottgrivner.dev)
**Reference:** [Main Branch](https://github.com/scottgriv/go-json_task_manager_api)---------------