From 11e534739132907c3e093aed84a27b454f5d4b0a Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Sun, 8 Jan 2023 09:24:34 +0530 Subject: [PATCH] add usage to README --- README.md | 24 ++++++++++++++++++++++++ readme.md | 14 -------------- 2 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 README.md delete mode 100644 readme.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0212529 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# PublAPI + +PublAPI is a simple API for Project Segfault's 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 it listens to port 3000 on 127.0.0.1. You can change the port with the environment variable PUBLAPI_PORT. + +## Usage +Currently, PublAPI has only two routes, /online and /signup. + +|---------|------|-----------------|------------------------------------| +| ROUTE | TYPE | EXTRA ARGS | DESCRIPTION | +|---------|------|-----------------|------------------------------------| +| /online | GET | N/A | Returns the number of online users | +| /signup | POST | username, email | Creates a register script and notifies admins that a new registration request was sent | +|---------|------|-----------------|------------------------------------| diff --git a/readme.md b/readme.md deleted file mode 100644 index 99dc0f4..0000000 --- a/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# Publapi - -Publapi is a simple API for Project Segfault's 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 it listens to port 3000 on 127.0.0.1. You can change the port with the environment variable PUBLAPI_PORT. \ No newline at end of file