Go-Url-Shortener
This project demonstrates basic CRUD operations using the Go programming language.
Contents
- Installation
- Usage
- Test
- Contributing
- License
Installation
- Clone this project:
git clone https://github.com/afurgapil/go-url-shortener.git
- Navigate to the project directory:
cd go-url-shortener
- Create the urls table on your MySQL server by running the
db-schema.sql
file.
- Install dependencies:
go mod tidy
- Check
.env
file
Usage
- Run the server:
go run cmd/go-url-shortener/main.go
- Access the API using an HTTP client.
Test
Test files are located in the test folder.
To run all tests go test ./test/... -v
Contributing
If you encounter any issues or have suggestions for improvements, please feel free to contribute. Your feedback is highly appreciated and contributes to the learning experience.
I especially need help in automating test processes. I have an automation experiment in .github/workflows/go.yaml, but I couldn't get the docker, mysql and test process to work properly. your help on this would make me very happy!
License
This project is licensed under the MIT License. For more information, please refer to the LICENSE file.