blob: 18ac0beb8c1587c72be65517f4141e1304006fd1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# Save server
## Requirements
- `nodejs` (recent)
- `npm`/`yarn`
## Docs
### CLI
- `node index register`: register user
### Endpoints
- POST `/login` `body{<username>, <password>}` =\> `.token`: generate
access token
- POST `/text` `header{<token>}` `body{<data>}`: upload text data
- POST `/file` `header{<token>}` `files{<file>}`: upload file
- GET `/file/<token>` `header{<token>}` =\> `<file>`: download file
using token
- GET `/saved` `header{<token>}` =\> `{{<file>}, {<text>}}`: list all
files/texts
## Installation
- edit `.env` file: `$EDITOR .env`
- install dependencies: `npm i`
- register user: `node index register`
- start server: `node index`
- configure one of the clients
|