{"id":20109781,"url":"https://github.com/hyper63/zap","last_synced_at":"2025-07-05T21:35:51.020Z","repository":{"id":110719218,"uuid":"344904704","full_name":"hyper63/zap","owner":"hyper63","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-05T20:32:45.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T18:31:55.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/hyper63.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-05T18:51:48.000Z","updated_at":"2021-03-05T20:32:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed1c6144-81d6-4983-aa5b-3fcdaa4bd332","html_url":"https://github.com/hyper63/zap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hyper63/zap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fzap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fzap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fzap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fzap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyper63","download_url":"https://codeload.github.com/hyper63/zap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fzap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263810639,"owners_count":23515182,"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-11-13T18:09:25.339Z","updated_at":"2025-07-05T21:35:51.005Z","avatar_url":"https://github.com/hyper63.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\n`zap` a react web server framework built on top of opine. This server framework,\nlets you create APIs using react for the server.\n\n```js\nimport React from \"react\";\nimport { App, Request, run, Use } from \"zap\";\n\nconst Hello = ({ req, res }) =\u003e (res.json({ hello: \"world\" }), null);\n\nrun(\n  \u003cApp\u003e\n    \u003cRequest path=\"/\"\u003e\n      \u003cHello /\u003e\n    \u003c/Request\u003e\n    \u003cListen port={3000} /\u003e\n  \u003c/App\u003e,\n);\n```\n\nIn Deno, create an import_map.json file\n\n```json\n{\n  \"imports\": {\n    \"react\": \"https://cdn.skypack.dev/react?dts\",\n    \"zap\": \"https://x.nest.land/zap@0.0.3/mod.js\"\n  }\n}\n```\n\n## API\n\n### App\n\nIs a wrapper for your application.\n\n```\n\u003cApp\u003e\n  ...\n\u003c/App\u003e\n```\n\n### Use\n\nallows you to use middleware, this middleware must have a `fn` that handles `(req, res, next)`\n\nProps\n\n* path [optional] - the path to run the middleware on, default is '*'\n* fn - the middleware function handler\n\n```\n\u003cUse fn={jwt} /\u003e\n```\n\n### Request\n\nDefines the request path for the api.\n\nProps\n\n* path - the request path\n* method - the request method to handle\n\n\n``` jsx\n\u003cRequest path=\"/\"\u003e\n\n\u003c/Request\u003e\n```\n\n### Listen\n\nthe Listen component takes the port the server will listen\n\n``` jsx\n\u003cListen port={3000} /\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyper63%2Fzap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyper63%2Fzap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyper63%2Fzap/lists"}