Skip to content
/ notes Public

An small API that stores and returns notes from cache.

Notifications You must be signed in to change notification settings

trixky/notes

Repository files navigation

notes

An small API that stores and returns notes from cache. It will work with the JSON representation of the notes.

A note has two fields: message, and an optional tag. Here are two examples:

{ "message": "Buy apples and orange", "tag": "groceries" }
{ "message": "Feed the cat"}
  • The tag field is optional.
  • The tag may be used to retrieve all notes with this tag.
  • A note may not have multiple tags.
  • The message field is mandatory and cannot be empty.

API

The api has only one endpoint which implements several methods:

  • GET /notes
  • POST /notes
  • DELETE /notes

For more details, see the postman collection

Usage

# go version go1.18.5 linux/amd64

# build and start the server with the default port (3000)
go run main.go

# build and start the server with a custom port using environment
NOTE_PORT=4000 go run main.go

About

An small API that stores and returns notes from cache.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages