not so small webring backend, written in go
Go to file
2024-07-16 23:39:38 +03:00
.github/workflows updated build 2024-07-16 23:22:40 +03:00
cmd/server added static and template embedding, updated build 2024-07-16 23:04:48 +03:00
internal added static and template embedding, updated build 2024-07-16 23:04:48 +03:00
migrations Initial commit 2024-07-16 15:40:41 +03:00
static Improve dashboard design 2024-07-16 19:35:30 +03:00
.env.template updated env template 2024-07-16 15:43:05 +03:00
.gitignore Update .gitignore 2024-07-16 16:54:02 +03:00
embedded.go added static and template embedding, updated build 2024-07-16 23:04:48 +03:00
go.mod Initial commit 2024-07-16 15:40:41 +03:00
go.sum Initial commit 2024-07-16 15:40:41 +03:00
Makefile Initial commit 2024-07-16 15:40:41 +03:00
README.md Update README.md 2024-07-16 23:39:38 +03:00

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
  • 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