Categorygithub.com/ProjectSegfault/publapi
modulepackage
0.0.0-20240522054626-2298cbeeee52
Repository: https://github.com/projectsegfault/publapi.git
Documentation: pkg.go.dev

# README

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.

ROUTETYPEEXTRA ARGSDESCRIPTION
/usersGETN/AReturn information about users.
/signupPOSTusername, email, sshCreates a register script and notifies admins that a new registration request was sent.

# Packages

No description provided by the author
No description provided by the author

# Functions

GetPort returns the port to listen on.