From 68bc1cb4b64c8b8c6dd724a9b470862dd7f953dc Mon Sep 17 00:00:00 2001 From: Tealk Date: Thu, 17 Mar 2022 13:58:41 +0100 Subject: [PATCH 1/9] update readme https://codeberg.org/kytta/toot/issues/4 --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 93356af..438023c 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,25 @@ Self-hosting toot outside of Vercel requires some extra setup: 3. Run the backend server for the form: ```sh - node api/toot.js + pm2 start api/toot.js --watch --ignore-watch="node_modules" ``` + > You can find a summary for pm2 at: https://pm2.keymetrics.io/docs/usage/quick-start/ -4. Set up a reverse proxy from `localhost:8000` to `/api/toot` +4. Set up webserver + 1. Apache + ``` + placeholder + ``` + + 2. Nginx + ``` + root /home/toot/public; + index.html; + + location /api/toot { + proxy_pass http://localhost:8000/; + } + ``` ## See also From c030a1739809670e580a78969fe329101a1899e6 Mon Sep 17 00:00:00 2001 From: Tealk Date: Thu, 17 Mar 2022 14:04:44 +0100 Subject: [PATCH 2/9] format prettier --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 438023c..c1d7588 100644 --- a/README.md +++ b/README.md @@ -46,28 +46,32 @@ Self-hosting toot outside of Vercel requires some extra setup: ```sh pm2 start api/toot.js --watch --ignore-watch="node_modules" ``` + > You can find a summary for pm2 at: https://pm2.keymetrics.io/docs/usage/quick-start/ 4. Set up webserver + 1. Apache - ``` - placeholder - ``` + + ``` + placeholder + ``` 2. Nginx - ``` - root /home/toot/public; - index.html; - location /api/toot { - proxy_pass http://localhost:8000/; - } - ``` + ``` + root /home/toot/public; + index.html; + + location /api/toot { + proxy_pass http://localhost:8000/; + } + ``` ## See also **[📯 Shareon](https://shareon.js.org)** - (lightweight, stylish, and ethical share buttons) uses [toot] under the hood! +(lightweight, stylish, and ethical share buttons) uses [toot] under the hood! ## Licence @@ -78,7 +82,7 @@ The ‘toot’ logo is based on Mastodon’s ‘Simple’ logo, licensed under [ The repo banner includes Mastodon’s ‘Full’ logo, licensed under [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html). ----- +--- This project is hosted on Codeberg: From 99236c65facbb75eb816e997ab7fc82cbbaf36e3 Mon Sep 17 00:00:00 2001 From: Tealk Date: Thu, 17 Mar 2022 14:09:30 +0100 Subject: [PATCH 3/9] add apache config --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c1d7588..610d051 100644 --- a/README.md +++ b/README.md @@ -54,13 +54,15 @@ Self-hosting toot outside of Vercel requires some extra setup: 1. Apache ``` - placeholder + DocumentRoot "path_to_toot/public" + + ProxyPass "/api/toot" "http://localhost:8000/" ``` 2. Nginx ``` - root /home/toot/public; + root path_to_toot/public; index.html; location /api/toot { From 325a4dd05664f88656058c4d642907a3ed76b638 Mon Sep 17 00:00:00 2001 From: Tealk Date: Fri, 18 Mar 2022 12:16:21 +0100 Subject: [PATCH 4/9] re-add node start command --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 610d051..6ab1014 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,11 @@ Self-hosting toot outside of Vercel requires some extra setup: 3. Run the backend server for the form: + ```sh + node api/toot.js + ``` + or if you want to run the process in the background: + ```sh pm2 start api/toot.js --watch --ignore-watch="node_modules" ``` From 26e2371709128a4521657b42c2060a538e67e725 Mon Sep 17 00:00:00 2001 From: Tealk Date: Fri, 18 Mar 2022 12:17:16 +0100 Subject: [PATCH 5/9] add syntax highlighting --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ab1014..6760c8b 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Self-hosting toot outside of Vercel requires some extra setup: 1. Apache - ``` + ```apacheconf DocumentRoot "path_to_toot/public" ProxyPass "/api/toot" "http://localhost:8000/" @@ -66,7 +66,7 @@ Self-hosting toot outside of Vercel requires some extra setup: 2. Nginx - ``` + ```nginxconf root path_to_toot/public; index.html; From f8f4aa06d9fffe483b342984fc23698560921213 Mon Sep 17 00:00:00 2001 From: Tealk Date: Fri, 18 Mar 2022 12:39:31 +0100 Subject: [PATCH 6/9] add missing space --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6760c8b..16ebff8 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ in the text field. The same goes for the `instance` URL parameter. This can be used to build custom share buttons for Mastodon: ```html - + Share on Mastodon ``` @@ -46,6 +48,7 @@ Self-hosting toot outside of Vercel requires some extra setup: ```sh node api/toot.js ``` + or if you want to run the process in the background: ```sh From e1b35b5d9ab984814c7c1b70b2d9acef592889a7 Mon Sep 17 00:00:00 2001 From: Tealk Date: Fri, 18 Mar 2022 12:41:00 +0100 Subject: [PATCH 7/9] reset html --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 16ebff8..bcff015 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,7 @@ in the text field. The same goes for the `instance` URL parameter. This can be used to build custom share buttons for Mastodon: ```html - + Share on Mastodon ``` From 9e534abd8d967ae2bc76ca43e63db4f3e15f67cf Mon Sep 17 00:00:00 2001 From: Tealk Date: Fri, 18 Mar 2022 13:04:56 +0100 Subject: [PATCH 8/9] add caddy only from the caddy documentation, not sure if this is how it works --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index bcff015..1e3a4b6 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,17 @@ Self-hosting toot outside of Vercel requires some extra setup: } ``` + 3. Caddy + + ```nginxconf + root * path_to_toot/public; + try_files index.html + + handle_path /api/toot { + reverse_proxy localhost:8000 + } + ``` + ## See also **[📯 Shareon](https://shareon.js.org)** From b8b07e424870e7b6b6e23dcc6bf403db54d56e34 Mon Sep 17 00:00:00 2001 From: Tealk Date: Tue, 17 May 2022 15:30:54 +0200 Subject: [PATCH 9/9] add caddy syntax --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e3a4b6..21bf5ea 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Self-hosting toot outside of Vercel requires some extra setup: 3. Caddy - ```nginxconf + ```caddy root * path_to_toot/public; try_files index.html