{"id":13676202,"url":"https://github.com/gopulse/pulse","last_synced_at":"2025-04-29T03:30:38.127Z","repository":{"id":149512208,"uuid":"621583375","full_name":"gopulse/pulse","owner":"gopulse","description":"Pulse: A Golang framework for web development","archived":false,"fork":false,"pushed_at":"2023-04-26T22:51:17.000Z","size":102,"stargazers_count":37,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-06-19T09:41:45.877Z","etag":null,"topics":["go","golang","golang-framework","gopulse","web"],"latest_commit_sha":null,"homepage":"","language":"Go","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/gopulse.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}},"created_at":"2023-03-31T00:49:48.000Z","updated_at":"2024-06-19T09:41:45.878Z","dependencies_parsed_at":"2024-01-07T22:23:30.566Z","dependency_job_id":null,"html_url":"https://github.com/gopulse/pulse","commit_stats":null,"previous_names":["gopulse/pulse-router","go-pulse/pulse"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopulse%2Fpulse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopulse%2Fpulse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopulse%2Fpulse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopulse%2Fpulse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gopulse","download_url":"https://codeload.github.com/gopulse/pulse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251426713,"owners_count":21587636,"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":["go","golang","golang-framework","gopulse","web"],"created_at":"2024-08-02T13:00:20.121Z","updated_at":"2025-04-29T03:30:37.783Z","avatar_url":"https://github.com/gopulse.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/32125808/231166226-c636f344-fc3b-4c71-9181-49fe97491127.png\" width=\"320px\"\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/gopulse/pulse)](https://goreportcard.com/report/github.com/gopulse/pulse)\n[![GitHub license](https://img.shields.io/github/license/gopulse/pulse)](LICENSE)\n[![Go Reference](https://pkg.go.dev/badge/github.com/gopulse/pulse.svg)](https://pkg.go.dev/github.com/gopulse/pulse)\n[![Go Doc](https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7\u0026style=flat-square)](https://pkg.go.dev/github.com/gopulse/pulse#pkg-overview)\n[![Discord Online](https://img.shields.io/discord/1095400462477426748?label=discord\u0026logo=discord\u0026logoColor=white)](https://discord.gg/JKcTwZYJ)\n[![codecov](https://img.shields.io/codecov/c/github/gopulse/pulse?token=RBXPY1WN2I)](https://codecov.io/gh/gopulse/pulse)\n[![CircleCI](https://img.shields.io/circleci/build/github/gopulse/pulse/master?token=7eda4a74e26b544956b8333b372592ee09cd7f8b)](https://dl.circleci.com/status-badge/redirect/gh/gopulse/pulse/tree/master)\n\n\u003c/div\u003e\n\nA **Golang** framework for web development that keeps your web applications and services responsive with its fast and lightweight design.\n\n## Features\n\n- Routing\n- Route groups\n- Static files\n- Simple and elegant API\n- Middleware support\n\n## Installation\n\nMake sure you have Go installed on your machine. Then run the following command:\n\nInitialize your project ([Learn](https://go.dev/blog/using-go-modules)). Then install **Pulse** with the go get command:\n\n```bash\ngo get github.com/gopulse/pulse\n```\n\n## Benchmarks :zap:\n\nThis test was performed by [Go Web](https://github.com/smallnest/go-web-framework-benchmark).\n\n\u003cimg src=\"https://user-images.githubusercontent.com/32125808/234717844-d7bf69f8-11cb-420f-bd58-30a38769614e.png\" alt=\"pulse framework pipeline benchmark\"\u003e\n\n## Getting Started\n\n```go\npackage main\n\nimport (\n\t\"github.com/gopulse/pulse\"\n)\n\nfunc main() {\n\tapp := pulse.New()\n\trouter := pulse.NewRouter()\n\n\tapp.Router = router\n\n\trouter.Get(\"/\", func(c *pulse.Context) error {\n\t\tc.String(\"Hello, World!\")\n\t\treturn nil\n\t})\n\n\tapp.Run(\":3000\")\n}\n```\n\n## Examples\n\n- Routing\n\nSupports `GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE`\n\n```go\npackage main\n\nimport (\n\t\"github.com/gopulse/pulse\"\n)\n\nfunc main() {\n    app := pulse.New()\n    router := pulse.NewRouter()\n    \n    // GET /hello\n    router.Get(\"/\", func(c *pulse.Context) error {\n        c.String(\"Hello, World!\")\n        return nil\n    })\n    \n    // GET /hello/:name\n    router.Get(\"/profile/:id\", func(c *pulse.Context) error {\n        c.String(\"Profile: \" + c.Param(\"id\"))\n        return nil\n    })\n    \n\t// GET /user/\n    router.Get(\"/user/*\", func(c *pulse.Context) error {\n        c.String(\"Hello, World!\")\n        return nil\n    })\n    \n    app.Router = router\n    \n    app.Run(\":3000\")\n}\n```\n\n- Route groups\n\nSupports `GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE`\n\n```go\npackage main\n\nimport (\n\t\"github.com/gopulse/pulse\"\n)\n\nfunc main() {\n\tapp := pulse.New()\n\trouter := pulse.NewRouter()\n\tapi := \u0026pulse.Group{\n\t\tprefix: \"/api\",\n\t\trouter: router,\n\t}\n\n\tv1 := api.Group(\"/v1\")\n\tv1.GET(\"/users\", func(ctx *Context) error {\n\t\tctx.String(\"users\")\n\t\treturn nil\n\t})\n\n\tapp.Router = router\n\n\tapp.Run(\":3000\")\n}\n```\n\n* Static files\n\n```go\npackage main\n\nimport (\n\t\"github.com/gopulse/pulse\"\n\t\"time\"\n)\n\nfunc main() {\n\tapp := pulse.New()\n\trouter := pulse.NewRouter()\n\n\t// Static files (./static) with cache duration 24 hours\n\trouter.Static(\"/\", \"./static\", \u0026pulse.Static{\n\t\tCompress:      true,\n\t\tByteRange:     false,\n\t\tIndexName:     \"index.html\",\n\t\tCacheDuration: 24 * time.Hour,\n\t})\n\n\tapp.Router = router\n\n\tapp.Run(\":3000\")\n}\n```\n\n* Middleware\n\n```go\npackage main\n\nimport (\n\t\"github.com/gopulse/pulse\"\n)\n\nfunc main() {\n\tapp := pulse.New()\n\trouter := pulse.NewRouter()\n\n\trouter.Get(\"/profile/:name\", func(ctx *pulse.Context) error {\n\t\tif ctx.Param(\"name\") != \"test\" {\n\t\t\tctx.Abort()\n\t\t\tctx.Status(404)\n\t\t\treturn nil\n\t\t}\n\t\tctx.String(\"hello\")\n\t\tctx.Next()\n\t\treturn nil\n\t})\n\n\tapp.Router = router\n\n\tapp.Run(\":3000\")\n}\n```\n\n## Available Middleware\n\n- [x] CORS Middleware: Enable cross-origin resource sharing (CORS) with various options.\n```go\npackage main\n\nimport (\n\t\"github.com/gopulse/pulse\"\n)\n\nfunc main() {\n\tapp := pulse.New()\n\trouter := pulse.NewRouter()\n\n\trouter.Get(\"/\", func(ctx *pulse.Context) error {\n\t\treturn nil\n\t})\n\n\trouter.Use(\"GET\", pulse.CORSMiddleware())\n\n\tapp.Router = router\n\n\tapp.Run(\":3000\")\n}\n```\n\n- [ ] Logger Middleware: Log every request with configurable options. **(Coming soon)**\n- [ ] Encrypt Cookie Middleware: Encrypt and decrypt cookie values. **(Coming soon)**\n- [ ] Timeout Middleware: Set a timeout for requests. **(Coming soon)**\n\n## License\n\nPulse is licensed under the MIT License. See [LICENSE](LICENSE) for the full license text.\n\n## Contributing\n\nContributions are welcome! Please read the [contribution guidelines](CONTRIBUTING.md) first.\n\n## Support\n\nIf you want to say thank you and/or support the active development of Pulse:\n1. Add a [GitHub Star](https://github.com/gopulse/pulse/stargazers) to the project.\n2. Tweet about the project [on your Twitter](https://twitter.com/intent/tweet?text=Pulse%20is%20a%20%23web%20%23framework%20for%20the%20%23Go%20programming%20language.%20It%20is%20a%20lightweight%20framework%20that%20is%20%23easy%20to%20use%20and%20easy%20to%20learn.%20It%20is%20designed%20to%20be%20a%20simple%20and%20elegant%20solution%20for%20building%20web%20applications%20and%20%23APIs%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgopulse%2Fpulse)\n3. Write a review or tutorial on [Medium](https://medium.com/), [dev.to](https://dev.to/), [Reddit](https://www.reddit.com/) or personal blog.\n4. [Buy Me a Coffee](https://www.buymeacoffee.com/gopulse)\n\n## Contributors\n\u003c!-- CONTRIBUTORS-START --\u003e\n\u003ca href=\"https://github.com/gopulse/pulse/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=gopulse/pulse\u0026columns=18\" /\u003e\n\u003c/a\u003e\n\u003c!-- CONTRIBUTORS-END --\u003e\n\n## Stargarazers over time\n\n[![Stargazers over time](https://starchart.cc/gopulse/pulse.svg)](https://starchart.cc/gopulse/pulse)\n","funding_links":["https://www.buymeacoffee.com/gopulse"],"categories":["Web框架","Go","Web Frameworks"],"sub_categories":["实用程序/Miscellaneous","Utility/Miscellaneous"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgopulse%2Fpulse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgopulse%2Fpulse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgopulse%2Fpulse/lists"}