not so small webring backend, written in go
Go to file
2024-07-17 18:42:05 +03:00
.github/workflows Update go.yml 2024-07-17 16:37:29 +03:00
cmd/server added favicon for sites, list all sites api and page, disabled cors for api, minor fixes 2024-07-17 02:48:53 +03:00
internal improved strategy for favicon retrieve 2024-07-17 18:42:05 +03:00
migrations added favicon for sites, list all sites api and page, disabled cors for api, minor fixes 2024-07-17 02:48:53 +03:00
static Add source code link to footer 2024-07-17 17:00:36 +03:00
.env.template Improve site listing page design and content 2024-07-17 16:31:01 +03:00
.gitignore added favicon for sites, list all sites api and page, disabled cors for api, minor fixes 2024-07-17 02:48:53 +03:00
embedded.go added favicon for sites, list all sites api and page, disabled cors for api, minor fixes 2024-07-17 02:48:53 +03:00
go.mod added favicon for sites, list all sites api and page, disabled cors for api, minor fixes 2024-07-17 02:48:53 +03:00
go.sum added favicon for sites, list all sites api and page, disabled cors for api, minor fixes 2024-07-17 02:48:53 +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