Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.24 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.24 KB

Webring Relay Service

This project is a webring relay service built with Go. It manages a list of websites, checks their uptime, and provides a dashboard for administration.

Features

  • Dashboard for managing websites in the webring
  • Automatic uptime checking of websites (with proxy support)
  • API endpoints for navigating the webring
  • Basic authentication for the dashboard

Prerequisites

  • Go 1.16 or later
  • PostgreSQL database

Installation

edit .env to set correct path to database

go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
go mod tidy
cp .env.template .env
make migrate-up

Local Run

go run cmd/server/main.go

or download prebuild version

wget https://github.com/Alexander-D-Karpov/webring/releases/latest/download/webring
chmod +x webring
./webring

Usage

  • Access the dashboard at http://localhost:8080/dashboard (use the credentials set in your .env file)
  • API endpoints:
    • Next site: GET /{id}/next/
    • Previous site: GET /{id}/prev/
    • Random site: GET /{id}/random/
    • Full data for a site: GET /{id}/data
  • Redirect endpoints:
    • Next site: GET /{id}/next
    • Previous site: GET /{id}/prev
    • Random site: GET /{id}/random