Skip to content

About

Portfolio Go REST API for tasks (pairs with Flutter client)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

go-tasks-api

Go REST API paired with a Flutter client — run locally with list, create, and complete.

Pair: flutter-task-app — Flutter client for this API.

Portfolio sample, not production.

Run (≈2 min)

  1. Clone and enter this repo.
  2. Start the server:
go run ./cmd/server

Optional: copy .env.example to .env and set PORT (default 8080).

  1. Verify:
curl -s http://127.0.0.1:8080/health
curl -s http://127.0.0.1:8080/tasks
curl -s -X POST http://127.0.0.1:8080/tasks \
  -H 'Content-Type: application/json' \
  -d '{"title":"Demo task"}'

Replace task-1 with the id from the create response:

curl -s -X PATCH http://127.0.0.1:8080/tasks/task-1/complete

Endpoints

Method Path Description
GET /health Liveness
GET /tasks List tasks
POST /tasks Create { "title": "..." }
PATCH /tasks/:id/complete Mark complete (idempotent)

Errors use JSON: {"error":"..."}.

Quality

go fmt ./...
go vet ./...
go test ./...

Stack

Go 1.22+ (net/http routing), in-memory store.

About

Portfolio Go REST API for tasks (pairs with Flutter client)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages