This repository contains the code for a Go API that implements a simple blog with user management, post creation, and commenting functionality.
Warning This project is in its early stages, and I'm using it as an opportunity to deepen my knowledge of Go. Therefore, I kindly request that you refrain from using it in a production environment for the time being, as there may be several bugs that could potentially lead to problems.
To install and run this project, follow these steps:
-
Ensure you have Go installed (version 1.20 or higher).
-
Clone this repository to your local machine.
-
Open a terminal and navigate to the project's directory.
-
Run the following command to download the project dependencies:
go mod tidy
This project uses the following third-party dependencies:
- github.com/gin-gonic/gin: A web framework for building APIs in Go.
- github.com/golang-jwt/jwt: JSON Web Token implementation for Go.
- golang.org/x/crypto: Go cryptography libraries.
- gorm.io/driver/postgres: PostgreSQL driver for the GORM ORM library.
- gorm.io/driver/sqlite: SQLite driver for the GORM ORM library.
- gorm.io/gorm: A powerful ORM library for Go.
Please refer to the respective documentation for more information on each dependency.
To start the Go Blog API, run the following command:
cd ./cmd/API
go run main.go
By default, the API will be accessible at http://localhost:3333. You can modify the port or other configurations in the main.go file.
Contributions are welcome! If you find any issues or want to enhance the functionality of this project, please submit a pull request. Make sure to follow the established coding guidelines and provide clear commit messages.
This project is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.