API for our upcoming pubnix. Maintained by @Odyssium and @arya
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Arya ebea2f9092
add todo to signup email
2 weeks ago
examples send user email once registration is sent 1 month ago
pages fix notify rooms 3 weeks ago
utils add todo to signup email 2 weeks ago
.gitignore remove binary wtf 2 months ago
LICENSE Arya fix it 2 months ago
README.md add signup ip support 1 month ago
go.mod switch to env for meta-info; add example meta-info.env 2 months ago
go.sum switch to env for meta-info; add example meta-info.env 2 months ago
main.go try fixing ip issue 1 month ago
publapi.env add notif after user is created 3 weeks ago

README.md

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.