Totally Real Facts is a parody website of Snopes.
-
Go (Optional)
-
PostgreSQL (Optional)
docker-compose up --buildIf you have Docker Compose 2.22.0 or later, you can develop with hot reload:
docker compose up --build --watchCurrently, running with Golang is cumbersome, but can be done with the following steps:
-
Install Go dependencies:
go mod download
-
Export environment variables:
# Postgres export MINISTRY_POSTGRES_HOST=localhost export MINISTRY_POSTGRES_USER=ministry export MINISTRY_POSTGRES_PASSWORD=ministry export MINISTRY_POSTGRES_DB=ministry # Spoofing export SPOOFER_TYPE=mock
-
Run the server:
go run cmd/ministry/main.go serve
-
Postgres
Name Description Required MINISTRY_POSTGRES_HOSTPostgreSQL host Yes MINISTRY_POSTGRES_USERPostgreSQL user Yes MINISTRY_POSTGRES_PASSWORDPostgreSQL password Yes MINISTRY_POSTGRES_DBPostgreSQL database Yes MINISTRY_POSTGRES_PORTPostgreSQL port No (default: 5432) -
Spoofing
Name Description Required MINISTRY_SPOOFER_TYPEType of spoofer to use. Options are mock, andopenaiYes MINISTRY_OPENAI_KEYOpenAI API key (required if MINISTRY_SPOOFER_TYPEisopenai)No
-
Description: Returns a HTML page cataloging the latest articles.
-
Response:
- Content-Type:
text/html - Body: Click here to view the full HTML template
- Content-Type:
-
Description: Returns a HTML page for a specific article.
-
Response:
- Content-Type:
text/html - Body: Click here to view the full HTML template
- Content-Type:
-
Description: Returns a 200 status code if the server is healthy.
-
Response:
- Status Code:
200
- Status Code: