API for our pubnix
Go to file
Arya b6c0ac8e6b
add users to `users` group
2023-01-21 22:30:00 +05:30
examples add matrix & fedi to meta-info 2023-01-21 16:55:08 +05:30
pages make signup script a template 2023-01-21 22:19:17 +05:30
utils add users to `users` group 2023-01-21 22:30:00 +05:30
.gitignore remove binary wtf 2023-01-07 19:16:48 +01:00
LICENSE Arya fix it 2023-01-07 16:33:51 +01:00
README.md liberapay badge doesnt apply here tbh 2023-01-19 12:01:48 +05:30
go.mod switch to env for meta-info; add example meta-info.env 2023-01-18 21:05:07 +05:30
go.sum switch to env for meta-info; add example meta-info.env 2023-01-18 21:05:07 +05:30
main.go make signup script a template 2023-01-21 22:19:17 +05:30

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_SHOUTRRRURL in order for signup notifications to work. Url Format can be found at https://containrrr.dev/shoutrrr/v0.5/services/matrix/

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.