{"id":27056510,"url":"https://github.com/damesek/golang-clojurescript","last_synced_at":"2026-04-29T17:07:15.558Z","repository":{"id":194030545,"uuid":"295987694","full_name":"damesek/golang-clojurescript","owner":"damesek","description":"Gracefully shutdown server with Golang for exported Clojurescript projects ","archived":false,"fork":false,"pushed_at":"2021-03-03T17:29:25.000Z","size":18942,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-09-12T10:42:14.837Z","etag":null,"topics":["cljs","clojure","clojurescript","golang","shadow-cljs"],"latest_commit_sha":null,"homepage":"https://github.com/damesek/golang-clojurescript","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damesek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-09-16T09:35:08.000Z","updated_at":"2021-03-03T17:29:27.000Z","dependencies_parsed_at":"2023-09-11T10:36:04.441Z","dependency_job_id":null,"html_url":"https://github.com/damesek/golang-clojurescript","commit_stats":null,"previous_names":["damesek/golang-clojurescript"],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damesek%2Fgolang-clojurescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damesek%2Fgolang-clojurescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damesek%2Fgolang-clojurescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damesek%2Fgolang-clojurescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damesek","download_url":"https://codeload.github.com/damesek/golang-clojurescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318728,"owners_count":20919483,"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":["cljs","clojure","clojurescript","golang","shadow-cljs"],"created_at":"2025-04-05T10:17:53.546Z","updated_at":"2026-04-29T17:07:15.509Z","avatar_url":"https://github.com/damesek.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gracefully shutdown Clojurescript with fast Go backend\nTODO add fasthttp package\n\nIn this way x5 better performance (with fasthttp x10) vs non-clustered nodejs. \nI used a *shadow-cljs project example* [https://github.com/shadow-cljs/quickstart-browser] and a *gracefull shutdown Go example* to create that mix.\n\nClone the repo or just Release RELEASE_X86_64 file and run\u003cBR\u003e \n*I use Mac OSX x86_64, if you use Linux/Windows/RPI maybe better if you rebuild*\n```bash\n./gocljs\n```\n-\u003e Don't forget add your public folder with index.html or unzip [public.zip] my shadow-cljs test\n \nAfter this you can see the message: \n```bash\n2021/03/03 18:10:11 server started\n```\non localhost:8081\n\nWhen you stop the server with CTRC+C, you will see:\n```bash\n^C2021/03/03 18:11:32 system call:interrupt\n2021/03/03 18:11:32 server stopped\n2021/03/03 18:11:32 server exited properly\n```\n\nDetails:\n\nTest with  \n```shell\ngo run gocljs.go\n```\nor compile a file to architecture\n```shell\ngo build .\n```\nWe use external files in this example, but I tested without any problem possible compile into binary the css/js/html files or run CLJS with V8 engine from Golang. \n\nLinks more info:\n- https://medium.com/@pinkudebnath/graceful-shutdown-of-golang-servers-using-context-and-os-signals-cc1fa2c55e97. That is possible with js/process `(.on js/process \"SIGINT\" shutdown-gracefully-functions)` and \n- Clojure side too (https://medium.com/helpshift-engineering/achieving-graceful-restarts-of-clojure-services-b3a3b9c1d60d).\n\nBtw \"Go- and Java-based webservers have shown to be the most efficient. Clustered NodeJS is reasonably efficient, but will run out of RAM once overloaded.\" Source: https://stressgrid.com/blog/webserver_benchmark/\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamesek%2Fgolang-clojurescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamesek%2Fgolang-clojurescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamesek%2Fgolang-clojurescript/lists"}