compile instruct + document endpoints

This commit is contained in:
array-in-a-matrix 2024-06-20 16:17:09 -04:00
parent e9c8846037
commit 57caf27c39

View file

@ -1,2 +1,37 @@
# server
This is the API server.
# Glimpse API server
This is the Glimpse API server.
## Run test server instance
Install needed libraries:
```sh
nimble install jester norm
```
Compile and run:
```sh
nimble run --verbose -d:normDebug
```
## API Endpoints
### /api/register
Arguments required: `username` `password`
```sh
curl -s -X POST http://localhost:5000/api/register -d 'username=Array' -d 'password=i8Vl8XZaVRiZFsZ'
```
### /api/upload
Arguments required: `file` `token`
Example:
```sh
curl -i -X POST -H "Content-Type: multipart/form-data" -F "file=@image.png" -F "token=SkNaeltRR2RPS3FXTUlvVkdBZ154S3Bjam5iZllkWnlxeVN3cUtfTVQ=" http://localhost:5000/api/upload
```