Initial Setup
go mod init github.com/your/repo
- Close this repository:
git clone https://github.com/soulinmaikadua/my-go-fiber.git
- Navigate to the project directory:
cd my-go-fiber
This project uses environment variables for configuration. Before running the application, make sure to create a .env
file in the root directory and define the following variables:
# Example .env file
# Database configuration
DB_HOST=localhost
DB_PORT=5432
DB_USER=username
DB_PASS=password
DB_NAME=dbname
# Other configuration variables
# Add any other environment variables your application needs here
Make sure to replace the placeholder values with your actual configuration.
To build the Go application, run the following command:
go build -o <output-file-name>
Replace with the desired name of the executable file.
After building the application, you can run it using the following command:
./<output-file-name>
Replace <output-file-name>
with the name of the executable file generated during the build process.