{"id":19427273,"url":"https://github.com/theasp/macchiato-core-async","last_synced_at":"2025-06-16T05:04:06.496Z","repository":{"id":81613347,"uuid":"97511470","full_name":"theasp/macchiato-core-async","owner":"theasp","description":"Core.async ring handler support for Macchiato","archived":false,"fork":false,"pushed_at":"2018-03-19T19:40:46.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T05:18:05.860Z","etag":null,"topics":["async","clojurescript","macchiato","macchiato-framework"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theasp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-17T18:55:01.000Z","updated_at":"2018-03-19T19:40:48.000Z","dependencies_parsed_at":"2023-03-06T16:30:25.368Z","dependency_job_id":null,"html_url":"https://github.com/theasp/macchiato-core-async","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theasp/macchiato-core-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theasp%2Fmacchiato-core-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theasp%2Fmacchiato-core-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theasp%2Fmacchiato-core-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theasp%2Fmacchiato-core-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theasp","download_url":"https://codeload.github.com/theasp/macchiato-core-async/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theasp%2Fmacchiato-core-async/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260101808,"owners_count":22959038,"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":["async","clojurescript","macchiato","macchiato-framework"],"created_at":"2024-11-10T14:11:07.232Z","updated_at":"2025-06-16T05:04:06.452Z","avatar_url":"https://github.com/theasp.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/theasp/macchiato-core-async.svg?style=svg)](https://circleci.com/gh/theasp/macchiato-core-async)\n[![Clojars Project](https://img.shields.io/clojars/v/ca.gt0.theasp/macchiato-core-async.svg)](https://clojars.org/ca.gt0.theasp/macchiato-core-async)\n\nA library for using [`core.async`](https://github.com/clojure/core.async/) with the [Macchiato Framework](https://macchiato-framework.github.io/).\n\n# Example\n\n```clojure\n(ns example\n  (:require-macros\n   [cljs.core.async.macros :refer [go go-loop]]\n   [hiccups.core :as hiccups :refer [html]])\n  (:require\n   [ca.gt0.theasp.macchiato-core-async :as m-async]\n   [macchiato.server :as http]\n   [macchiato.middleware.defaults :as defaults]\n   [macchiato.middleware.restful-format :as restful-format]\n   [macchiato.middleware.resource :as resource]\n   [macchiato.util.response :as r]\n   [bidi.bidi :as bidi]\n   [bidi.ring :as bidi-ring]\n   [taoensso.timbre :as timbre\n    :refer-macros (tracef debugf infof warnf errorf)]))\n\n(defn not-found [req]\n  (-\u003e [:html [:body [:h1 \"404\" ]]]\n      (html)\n      (r/ok))))\n\n(defn index-page [req]\n  (go \n    (-\u003e [:html [:body [:p \"Hi\" ]]]\n        (html)\n        (r/ok))))\n          \n(def handlers {:index-page index-page\n               :not-found  not-found})\n\n(def routes [\"/\" index-page])\n\n(def handler (-\u003e (bidi-ring/make-handler routes #(get handlers (:not-found handlers))\n                 (m-async/wrap-async)\n                 (restful-format/wrap-restful-format {:keywordize? true})\n                 (resource/wrap-resource \"resources/public\")\n                 (defaults/wrap-defaults {}))))\n\n(http/start {:handler    handler\n             :host       host\n             :port       port\n             :on-success #(infof \"HTTP server listening on %s:%s\" host port)})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheasp%2Fmacchiato-core-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheasp%2Fmacchiato-core-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheasp%2Fmacchiato-core-async/lists"}