How to Install Goshorly on macOS
Goshorly is a lightweight URL shortener written in Go. This guide will walk you through the steps of installing Goshorly on macOS.
Prerequisites
Before you begin, ensure that you have the following installed on your macOS:
- Go
- Git
You can install Go by downloading it from the official website at https://golang.org/dl/. Git should be pre-installed on macOS.
Step 1: Clone the Repository
To install Goshorly, you need to clone the Goshorly repository. Open your terminal and run the following command to clone the repository:
$ git clone https://gitea.hackmi.ch/Phil/goshorly.git
This will clone the Goshorly repository into your current working directory.
Step 2: Install Dependencies
After cloning the repository, you need to install dependencies. Run the following command to install the dependencies:
$ go get -d ./...
The above command will download and install all the dependencies required by Goshorly.
Step 3: Build Goshorly
Once the dependencies are downloaded, run the following command to build Goshorly:
$ go build -o goshorly
This will generate an executable binary file named "goshorly" in your current working directory.
Step 4: Run Goshorly
Finally, to run Goshorly, run the following command:
$ ./goshorly
This will start the Goshorly server, and it should be accessible at http://localhost:8080.
Congratulations! You have successfully installed Goshorly on your macOS.