Skip to content

matteo-pampana/rest-api-with-new-routing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notes REST API with New Go 1.22 Routing

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.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Go 1.22 or higher

Installing

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

Running the application

To start the HTTP server at port 8080, run:

make run

API Endpoints

  • POST /notes: Create a new note
  • GET /notes: Get all notes
  • GET /notes/{id}: Get a note by ID
  • PUT /notes/{id}: Update a note by ID
  • DELETE /notes/{id}: Delete a note by ID

Created with ❤️ by Matteo Pampana

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published