{"id":23436900,"url":"https://github.com/logseq/deprecated-github-backend","last_synced_at":"2025-04-13T04:42:24.397Z","repository":{"id":103401720,"uuid":"391636747","full_name":"logseq/deprecated-github-backend","owner":"logseq","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-01T13:42:52.000Z","size":85,"stargazers_count":18,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-23T04:24:15.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logseq.png","metadata":{"files":{"readme":"readme.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-08-01T13:37:02.000Z","updated_at":"2022-11-01T08:14:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"c154de57-9c57-4c48-ae93-03671fee4458","html_url":"https://github.com/logseq/deprecated-github-backend","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"f07c382c789ff94cf49913d3abcb016c71ac38ac"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdeprecated-github-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdeprecated-github-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdeprecated-github-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdeprecated-github-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logseq","download_url":"https://codeload.github.com/logseq/deprecated-github-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248183569,"owners_count":21061176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T13:34:50.252Z","updated_at":"2025-04-13T04:42:24.374Z","avatar_url":"https://github.com/logseq.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"* Logseq\n  Logseq is A privacy-first, open-source platform for knowledge sharing and management.\n\n** *Warning*:\n   The GitHub integration is deprecated, we're not going to accept any PRs. \n\n** Website\n   https://logseq.com\n\n** Setup development environment\n   If you're on Windows, use the [[#windows-setup][Windows setup]].\n\n*** 1. Requirements\n\n**** [[https://clojure.org/guides/getting_started][Java \u0026\u0026 Clojure]]\n\n**** [[https://www.postgresql.org/download/][PostgreSQL]]\n\n**** [[https://nodejs.org/en/][Node.js]]\n\n**** 2. Create a GitHub app\n\n     Follow the guide at\n     [[https://docs.github.com/en/free-pro-team@latest/developers/apps/creating-a-github-app]],\n     where the user authorization \"Callback URL\" should be\n     =http://localhost:3000/auth/github=.\n\n     Remember to download the =private-key.pem= which will be used for the\n     next step. Also take note of your =App ID=, =Client ID=, and your newly\n     generated =Client Secret= for use in step 4.\n\n     #+caption: Screenshot 2020-11-27 22-22-39 +0800\n     [[https://user-images.githubusercontent.com/479169/100460276-e0bad100-3101-11eb-8fed-1f7c85824b62.png]]\n\n     *Add contents permission*:\n     [[https://user-images.githubusercontent.com/479169/100460271-def10d80-3101-11eb-91bb-f2339a52d4f8.png]]\n\n*** 3. Set up PostgreSQL\n\n    Make sure you have PostgreSQL running. You can check if it's running\n    with =pg_ctl -D /usr/local/var/postgres status= and use\n    =pg_ctl -D /usr/local/var/postgres start= to start it up. You'll also\n    need to make a Logseq DB in PostgreSQL. Do that with =createdb logseq=.\n\n*** 4. Add environment variables\n    #+BEGIN_SRC sh\n      export ENVIRONMENT=\"dev\"\n      export JWT_SECRET=\"xxx\"\n      export COOKIE_SECRET=\"xxx\"\n      export DATABASE_URL=\"postgresql://your-user:your-password@localhost:5432/logseq\"\n      export GITHUB_APP2_NAME=\"your github app name\"\n      export GITHUB_APP2_ID=\"your app id\"\n      export GITHUB_APP2_KEY=\"you client id\"\n      export GITHUB_APP2_SECRET=\"your secret\"\n      export GITHUB_REDIRECT_URI=\"http://localhost:3000/auth/github\"\n      # Replace your-code-directory with yours\n      export GITHUB_APP_PEM=\"/your-code-directory/logseq/pem/logseq-test.2020-08-27.private-key.pem\"\n      export GOOGLE_APP_KEY=\"your key\"\n      export GOOGLE_APP_SECRET=\"your secret\"\n      export GOOGLE_REDIRECT_URI=\"http://localhost:3000/auth/google\"\n      export LOG_PATH=\"/tmp/logseq\"\n      export WEBSITE_URL=\"http://localhost:3000\"\n      export COOKIE_DOMAIN=\"localhost\"\n\n      export AWS_ACCESS_KEY_ID=\"your key id\"\n      export AWS_SECRET_ACCESS_KEY=\"your secret\"\n      export AWS_PK_PATH=\"/your/pk.pem\"\n      export AWS_KEY_PAIR_ID=\"your key pair id\"\n      export AWS_REGION=\"us-west-1\"\n    #+END_SRC\n\n*** 3. Start the clojure server\n\n**** Using in Emacs\n     #+BEGIN_EXAMPLE\n        1. C-c M-j and select \"clojure-cli\"\n        2. input \"(go)\" in the clojure repl\n     #+END_EXAMPLE\n     (Note: to specify an alias from within emacs you can follow either option suggested [[https://github.com/clojure-emacs/cider/issues/2396][here]])\n**** Using in Cli\n     #+BEGIN_EXAMPLE\n        1. clj -A:dev\n        2. input \"(go)\" in the clojure repl\n     #+END_EXAMPLE\n\n**** Using in Calva (Visual Studio Code)\n     #+BEGIN_EXAMPLE\n         1. Issue the command Start a REPL server and Connect: ctrl+alt+c ctrl+alt+j\n         2. Select clojure-cli\n         3. input \"(go)\" in the clojure repl\n     #+END_EXAMPLE\n\n*** 4. Compile javascript\n    #+BEGIN_SRC sh\n      cd web\n      yarn\n      yarn watch\n      open http://localhost:3000\n    #+END_SRC\n\n** Windows setup\n\n*** 1. Required software\n    Install clojure through scoop-clojure: https://github.com/littleli/scoop-clojure. You can also install [[https://nodejs.org/en/][Node.js]], [[https://yarnpkg.com/][Yarn]] and [[https://www.postgresql.org/download/][PostgreSQL]] through scoop if you want to.\n\n*** 2. Setup PostgreSQL\n    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.\n    You'll also need to make a logseq DB in PostgreSQL. Do that with ~createdb logseq~.\n\n*** 3. Setup the server\n    Download [[https://gist.github.com/samfundev/98088dd76f67085f114c75493261aa3d][this little script]] that sets up the environment variables and runs ~cmd-clj -A:dev~.\n    The ~GITHUB_APP_PEM~ variable in the script needs to be set with the correct directory for your system.\n    Run that script in the repo and enter ~(go)~ into the interpreter.\n\n*** 4. Setup the website\n    Either run ~cmd-clojure -A:cljs watch app~ instead of ~yarn watch~ in the next step or modify web/package.json to use cmd-clojure instead of clojure in the scripts section.\n\n    Open command prompt in the repo and do:\n    #+BEGIN_SRC batch\n      cd web\n      yarn\n      yarn watch\n    #+END_SRC\n    Wait for it to compile and open ~localhost:3000~.\n\n*** Notes\n    1. The clojure deps should be synced between the two files: ~project.clj~ and ~deps.edn~.\n       We need the ~project.clj~ because it's used for dokku deployment.\n    2. To use github push, comment this line https://github.com/tiensonqin/logseq/blob/master/web/src/main/frontend/handler.cljs#L751\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogseq%2Fdeprecated-github-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogseq%2Fdeprecated-github-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogseq%2Fdeprecated-github-backend/lists"}