Go Note App is a simple note-taking application built with Go. It allows users to create, read, update, and delete notes via a RESTful API.
To install and run Go Note App locally, follow these steps:
- Clone the repository:
git clone https://github.com/nattrio/go-note-app.git
- Navigate to the project directory:
cd go-note-app
-
Create a
.env
file in the project root directory and configure the required environment variables. You can use the provided.env.example
file as a template. -
Build and run the application using Docker Compose:
docker-compose up --build
This command will build the Docker image and start the application and its dependencies (PostgreSQL database) as Docker containers.
- The Go Note App API should now be accessible at http://localhost:3000. You can send HTTP requests to this endpoint to interact with the application.
The API provides the following endpoints:
GET /healthchecker
: Returns a JSON response with a status and welcome message.POST /notes
: Creates a new note.GET /notes
: Retrieves all notes.PATCH /notes/:noteId
: Updates a note.GET /notes/:noteId
: Retrieves a specific note.DELETE /notes/:noteId
: Deletes a note.