1
0
Fork
You've already forked publapi
0
API for our pubnix
Go 79.5%
Shell 20.5%
Find a file
2025年01月02日 13:41:46 +03:00
examples Re-factor, part 1 2025年01月02日 13:41:46 +03:00
pages Re-factor, part 1 2025年01月02日 13:41:46 +03:00
utils Re-factor, part 1 2025年01月02日 13:41:46 +03:00
.gitignore Re-factor, part 1 2025年01月02日 13:41:46 +03:00
go.mod seems like 1.22+ was required 2024年10月09日 21:24:29 +02:00
go.sum seems like 1.22+ was required 2024年10月09日 21:24:29 +02: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 seems like 1.22+ was required 2024年10月09日 21:24:29 +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.22+ 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.