This is an example of a RESTful service written in Go. The service is a note management application that allows you to create, read, update, and delete notes (CRUD).
The REST APIs were written using the new routing functions of Go 1.22.
This project was created for learning and demonstration purposes.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Go 1.22 or higher
Clone the repository:
git clone https://github.com/matteo-pampana/rest-api-with-new-routing.git
Navigate to the cloned directory:
cd rest-api-with-new-routing
Download the dependencies:
make build
To start the HTTP server at port 8080, run:
make run
POST /notes
: Create a new noteGET /notes
: Get all notesGET /notes/{id}
: Get a note by IDPUT /notes/{id}
: Update a note by IDDELETE /notes/{id}
: Delete a note by ID
Created with ❤️ by Matteo Pampana