mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
compile instruct + document endpoints
This commit is contained in:
parent
e9c8846037
commit
57caf27c39
1 changed files with 37 additions and 2 deletions
39
README.md
39
README.md
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue