API for our pubnix
Go to file
2024-09-28 19:51:27 +02:00
examples send user email once registration is sent 2023-02-05 19:00:47 +05:30
pages more detailed error 2024-09-28 19:51:27 +02:00
utils specify rooms 2023-10-17 11:38:32 +05:30
.gitignore remove binary wtf 2023-01-07 19:16:48 +01:00
go.mod Require a captcha on the backend 2023-07-10 22:23:29 +01:00
go.sum Require a captcha on the backend 2023-07-10 22:23:29 +01:00
LICENSE Arya fix it 2023-01-07 16:33:51 +01:00
main.go try fixing ip issue 2023-02-18 10:24:36 +01:00
publapi.env specify rooms 2023-10-17 11:38:32 +05:30
README.md feat: add go link 2023-05-28 15:42:21 +02:00

PublAPI

Go Version License Matrix

PublAPI is a simple API for Project Segfault's upcoming public shared system (pubnix).

Install

An installation of Go 1.19 or higher is required.

git clone https://github.com/ProjectSegfault/publapi
go mod download 
go build 
./publapi

By default publapi listens on 127.0.0.1:3000. You can change the port with the environment variable PUBLAPI_PORT.

Additionally, you need to set the variable PUBLAPI_EMAIL_SHOUTRRRURL and PUBLAPI_NOTIFY_SHOUTRRRURL in order for signup notifications to work. URL Format can be found at https://containrrr.dev/shoutrrr/v0.5.

You can also set PUBLAPI_SIGNUP_IP to make sure signup requests can only be made from one IP.

Usage

Currently, PublAPI has only two routes, /users and /signup.

ROUTE TYPE EXTRA ARGS DESCRIPTION
/users GET N/A Return information about users.
/signup POST username, email, ssh Creates a register script and notifies admins that a new registration request was sent.