Files
logseq/readme.org
2020-08-01 09:27:40 +08:00

61 lines
1.8 KiB
Org Mode

* Logseq
Logseq is a local-first, non-linear, outliner notebook for organizing and sharing your personal knowledge base.
** Website
https://logseq.com
** Setup development environment
*** 1. Requirements
**** [[https://clojure.org/guides/getting_started][Java && Clojure]]
**** [[https://www.postgresql.org/download/][Postgresql]]
**** [[https://nodejs.org/en/][Nodejs]]
*** 2. Add environment variables
#+BEGIN_SRC sh
export ENVIRONMENT="dev"
export GITHUB_APP_KEY="ecaceddfdb7158c4e384"
export GITHUB_APP_SECRET="3e337d07f61585576362c95dcb8cd98756e43f65"
export GITHUB_REDIRECT_URI="http://localhost:3000/auth/github"
export JWT_SECRET="4fa183cf1d28460498b13330835e80ad"
export COOKIE_SECRET="10a42ca724e34f4db6086a772d787034"
export DATABASE_URL="postgres://localhost:5432/logseq"
#+END_SRC
*** 3. Start the clojure server
**** Using in Emacs
#+BEGIN_EXAMPLE
1. C-c M-j and select "clojure-cli"
2. input "(go)" in the clojure repl
#+END_EXAMPLE
**** Using in Cli
#+BEGIN_EXAMPLE
1. clj -A:dev
2. input "(go)" in the clojure repl
#+END_EXAMPLE
**** Using in Calva (Visual Studio Code )
#+BEGIN_EXAMPLE
1. Issue the command Start a REPL server and Connect: ctrl+alt+c ctrl+alt+j
2. Select clojure-cli
3. input "(go)" in the clojure repl
#+END_EXAMPLE
*** 4. Compile javascript
#+BEGIN_SRC sh
cd web
yarn
yarn watch
open http://localhost:3000
#+END_SRC
*** Notes
1. The clojure deps should be synced between the two files: ~project.clj~ and ~deps.edn~.
We need the ~project.clj~ because it's used for dokku deployment.
2. To use github push, comment this line https://github.com/tiensonqin/logseq/blob/master/web/src/main/frontend/handler.cljs#L751