Add Getting Started
48
Getting-Started.md
Normal file
48
Getting-Started.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
git clone git@git.samantha42.xyz:samantha/Portfolio-Engine.git
|
||||
cd Portfolio-Engine
|
||||
go mod download
|
||||
go run main.go
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
```bash
|
||||
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.
|
||||
Reference in New Issue
Block a user