mirror of
https://github.com/Alexander-D-Karpov/webring.git
synced 2026-03-16 22:07:41 +03:00
36 lines
977 B
Markdown
36 lines
977 B
Markdown
# 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
|
|
```
|
|
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
|
|
go mod tidy
|
|
make migrate-up
|
|
```
|
|
|
|
## 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`
|