readme.org 2.3 KB

Logseq

Logseq is A privacy-first, open-source platform for knowledge sharing and management.

Setup development environment

If you're on Windows, use the Windows setup.

2. Add environment variables

  export ENVIRONMENT="dev"
  export JWT_SECRET="4fa183cf1d28460498b13330835e80ab"
  export COOKIE_SECRET="10a42ca724e34f4db6086a772d787030"
  export DATABASE_URL="postgres://localhost:5432/logseq"
  export GITHUB_APP2_ID="78728"
  export GITHUB_APP2_KEY="xxxxxxxxxxxxxxxxxxxx"
  export GITHUB_APP2_SECRET="xxxxxxxxxxxxxxxxxxxx"
  # Replace your-code-directory with yours
  export GITHUB_APP_PEM="/your-code-directory/your-app.private-key.pem"

3. Start the clojure server

  # 1. cd resources
  # 1. Download jar
  wget https://github.com/logseq/logseq-internal/releases/download/0.0.4.1/logseq.jar
  # 2. run jar
  java -Duser.timezone=UTC -jar logseq.jar

4. Compile javascript

  cd web
  yarn
  yarn watch
  open http://localhost:3000

Windows setup

1. Required software

Install clojure through scoop-clojure: https://github.com/littleli/scoop-clojure. You can also install Node.js, Yarn and PostgreSQL through scoop if you want to.

2. Setup PostgreSQL

Make sure you have PostgreSQL running. You can check if it's running with pg_ctl status and use pg_ctl start to start it up. You'll also need to make a logseq DB in PostgreSQL. Do that with createdb logseq.

3. Setup the server

Download this little script that sets up the environment variables and runs cmd-clj -A:dev. The GITHUB_APP_PEM variable in the script needs to be set with the correct directory for your system. Run that script in the repo and enter (go) into the interpreter.