mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
chore: add basic testing instructions
Move commented out PUBLISH-API-BASE so that it actually works
This commit is contained in:
12
deps/publish/README.md
vendored
12
deps/publish/README.md
vendored
@@ -20,3 +20,15 @@ This module is intended to be consumed by the Logseq app and the publishing work
|
||||
## Dev
|
||||
|
||||
Keep this module aligned with the main repo's linting and testing conventions.
|
||||
|
||||
### Local Testing
|
||||
|
||||
For one-time setup, install the [CloudFlare cli wrangler](https://developers.cloudflare.com/workers/wrangler/) with `npm install -g wrangler@latest`.
|
||||
|
||||
To test the publish feature locally, follow these steps:
|
||||
|
||||
* Run `yarn watch` or `yarn release` to build the publish worker js asset.
|
||||
* Run `wrangler dev` in worker/ to start a local cloudflare worker server.
|
||||
* In `frontend.config`, enable the commented out `PUBLISH-API-BASE` which points to a localhost url.
|
||||
* Login on the desktop app.
|
||||
* Go to any page and select `Publish` from its page menu.
|
||||
@@ -25,8 +25,6 @@
|
||||
;; when it launches (when pro plan launches) it should be removed
|
||||
(def ENABLE-SETTINGS-ACCOUNT-TAB false)
|
||||
|
||||
;; (def PUBLISH-API-BASE "http://localhost:8787")
|
||||
|
||||
(if ENABLE-FILE-SYNC-PRODUCTION
|
||||
(do (def LOGIN-URL
|
||||
"https://logseq-prod.auth.us-east-1.amazoncognito.com/login?client_id=3c7np6bjtb4r1k1bi9i049ops5&response_type=code&scope=email+openid+phone&redirect_uri=logseq%3A%2F%2Fauth-callback")
|
||||
@@ -50,6 +48,9 @@
|
||||
(def OAUTH-DOMAIN "logseq-test2.auth.us-east-2.amazoncognito.com")
|
||||
(def PUBLISH-API-BASE "https://logseq-publish-staging.logseq.workers.dev")))
|
||||
|
||||
;; Enable for local development
|
||||
;; (def PUBLISH-API-BASE "http://localhost:8787")
|
||||
|
||||
(goog-define ENABLE-RTC-SYNC-PRODUCTION false)
|
||||
(if ENABLE-RTC-SYNC-PRODUCTION
|
||||
(def RTC-WS-URL "wss://ws.logseq.com/rtc-sync?token=%s")
|
||||
|
||||
Reference in New Issue
Block a user