-
Notifications
You must be signed in to change notification settings - Fork 50
4. Environment
Ebenezer Emelogu edited this page Jul 18, 2024
·
12 revisions
This document outlines the environment setup required to run the HNG Boilerplate Golang Web application. It covers the necessary software, hardware, and configuration settings to ensure a smooth development and deployment process.
- Version: 1.17 or later
- Installation: Follow the official Go installation guide for your operating system.
- Version: 9.6 or later
-
Installation: You can install PostgreSQL using the package manager of your choice:
-
Homebrew (MacOS):
brew install postgresql
-
APT (Ubuntu):
sudo apt-get update sudo apt-get install postgresql postgresql-contrib
-
YUM (CentOS):
sudo yum install postgresql-server postgresql-contrib
-
Homebrew (MacOS):
- Purpose: To run PostgreSQL instances in containers, simplifying setup and teardown.
- Installation: Follow the official Docker installation guide.
- Version: Latest version recommended.
- Installation: Follow the official Git installation guide.
You need two PostgreSQL instances: one for regular development and one for running tests. You can set them up locally or use Docker for convenience.
To set up PostgreSQL instances using Docker, run the following commands:
docker run --name main_db -e POSTGRES_PASSWORD=password -d postgres
docker run --name test_db -e POSTGRES_PASSWORD=password -d postgres