Clone
1
Getting Started
samantha edited this page 2026-03-27 10:41:18 +00:00

Getting Started

Prerequisites

  • Go 1.21+
  • GCC (required for SQLite CGO bindings)
    • Ubuntu/Debian: sudo apt install gcc
    • macOS: comes with Xcode Command Line Tools (xcode-select --install)

Clone and Run

git clone git@git.samantha42.xyz:samantha/Portfolio-Engine.git
cd Portfolio-Engine
go mod download
go run main.go

Build

chmod +x build.sh
./build.sh
./Portifolio

Startup Output

Connected to SQLite database
Tables ready
Server running on :8080

Shell ready. Type 'help' for commands.
>

The HTTP server and the interactive shell run concurrently. The API is live while you type shell commands.

The SQLite database (app.db) is created automatically on first run in the project root. Foreign key enforcement is enabled.

Verify It's Running

curl http://localhost:8080/health

A 200 OK with a JSON body confirms the server is up and the database is reachable. A 503 with "status": "degraded" means the database is unreachable.