From 62146a790b7d11949dc987414d12c4eb4919e521 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 14 Apr 2022 00:58:03 +0200 Subject: Basic features --- server/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 server/README.md (limited to 'server/README.md') diff --git a/server/README.md b/server/README.md new file mode 100644 index 0000000..18ac0be --- /dev/null +++ b/server/README.md @@ -0,0 +1,31 @@ +# Save server + +## Requirements + +- `nodejs` (recent) +- `npm`/`yarn` + +## Docs + +### CLI + +- `node index register`: register user + +### Endpoints + +- POST `/login` `body{, }` =\> `.token`: generate + access token +- POST `/text` `header{}` `body{}`: upload text data +- POST `/file` `header{}` `files{}`: upload file +- GET `/file/` `header{}` =\> ``: download file + using token +- GET `/saved` `header{}` =\> `{{}, {}}`: 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 -- cgit v1.2.3