From e26f6af4acfae2c67af4bff1488975683ae7dd66 Mon Sep 17 00:00:00 2001 From: Antonio Cheong Date: Wed, 30 Aug 2023 17:47:04 +0800 Subject: [PATCH] Update README.md --- README.md | 82 ++++++++++++------------------------------------------- 1 file changed, 18 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 1156504..bdf34bc 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Reverse engineered obsidian sync server (NOT OFFICIAL) These features are not in the latest release but in the main branch. They might not be fully tested and are probably unstable. -- Obsidian publish +- N/A ## To do @@ -42,72 +42,26 @@ These features are not in the latest release but in the main branch. They might - `git clone https://github.com/acheong08/obsidian-sync` - `cd obsidian-sync` - `go run cmd/obsidian-sync/main.go` +Optional: +- Configure [nginx](https://github.com/acheong08/rev-obsidian-sync/wiki/Nginx-Configuration) +- HTTPS is recommended. -HTTPS is not required. - -When you're done, configure the [plugin](#sync-override-plugin) - -
- - -### Nginx configuration - - -```nginx -map $http_upgrade $connection_upgrade { - default upgrade; - '' close; -} -server { - listen 80; - listen [::]:80; - location / { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:3000/; - } - server_name ; # e.g. api.obsidian.md -} -# This is for obsidian publish (Optional) -server { - listen 80; - listen [::]:80; - location / { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:3000/published/; - } - server_name ; # e.g. publish.obsidian.md -} -``` - -You can use `certbot` or cloudflare to handle HTTPS although it is not mandatory. - -
+When you're done, install and configure the [plugin](https://github.com/acheong08/rev-obsidian-sync-plugin) ## Adding a new user `go run cmd/signup/main.go` -## Sync override plugin - -Tested on - -- IOS -- Linux (Flatpak) - -### Usage - -> While we have no qualms with reverse engineering as a playground for experimentation, Obsidian Sync is a service we intend to keep first-party only for the foreseeable future. - https://github.com/obsidianmd/obsidian-releases/pull/2353 - -This plugin will not be part of the official community plugins list. - -- Install https://github.com/acheong08/rev-obsidian-sync-plugin -- Go to settings -- Set API endpoint - - e.g. `https://obsidian.yourdomain.com` - - For development: `http://127.0.0.1:3000` +Alternatively: +```bash +curl --request POST \ + --url https://yourdomain.com/user/signup \ + --header 'Content-Type: application/json' \ + --data '{ + "email": "example@example.com", + "password": "example_password", + "name": "Example User", + "signup_key": "" +}' +``` +You can set the signup key via the `SIGNUP_KEY` environment variable. If it has not been set, you can exclude it from the request.