{"id":17684475,"url":"https://github.com/mx1700/webfun","last_synced_at":"2025-03-30T20:19:00.626Z","repository":{"id":73385431,"uuid":"100706040","full_name":"mx1700/WebFun","owner":"mx1700","description":"为 Kotlin 设计的极简 Web 框架","archived":false,"fork":false,"pushed_at":"2017-10-20T14:22:18.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T23:01:59.191Z","etag":null,"topics":["framework","functional","kotlin","web"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/mx1700.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":"2017-08-18T11:33:37.000Z","updated_at":"2017-10-20T13:29:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"56a83bf0-8114-445e-b84f-0df1e9f94396","html_url":"https://github.com/mx1700/WebFun","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mx1700%2FWebFun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mx1700%2FWebFun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mx1700%2FWebFun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mx1700%2FWebFun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mx1700","download_url":"https://codeload.github.com/mx1700/WebFun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246372857,"owners_count":20766652,"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":["framework","functional","kotlin","web"],"created_at":"2024-10-24T10:23:35.118Z","updated_at":"2025-03-30T20:19:00.601Z","avatar_url":"https://github.com/mx1700.png","language":"Kotlin","readme":"WebFun\n========\n为 Kotlin 设计的极简 Web 框架\n\n快速开始\n--------\n```kotlin\nfun main(args: Array\u003cString\u003e) {\n    val app = Application.create(currentClassName())\n    app.run(8080)\n}\n\n@Route(\"/\")\nfun index(name: String = \"Tom\", req: Request): String {\n    return \"hello, $name, method: ${req.method}\"\n}\n```\n\n\n\nTODO\n-----------------------\n1. req \u0026 resp 类设计（不可变类）\n1. cookie 支持\n1. 简单路由\n1. 简单路由参数\n1. 错误路由（@ErrorHandler 注解）\n1. 中间件\n1. 日志集成\n1. 中间件依赖注入\n1. 环境变量\n1. 启动参数\n1. 静态文件支持\n1. 模板引擎\n1. session\n1. 输出扩展（可以扩展输出格式）\n1. 输入参数扩展\n1. 文件上传\n1. 静态文件支持\n1. spring\n1. 辅助response函数：abort， redirect\n1. 编译期反射，去除运行时反射\n1. 错误页\n1. request files\n1. json 支持\n1. 切换 undertow.io\n\n\n外观（API）\n-----------------------\n1. 路由（参数路由，路由参数注入）\n1. url_for 反向生成路由url （http://flask.pocoo.org/docs/0.12/quickstart/#url-building）\n1. req\n1. resp\n1. 静态文件\n1. 模板 （http://flask.pocoo.org/docs/0.12/quickstart/#rendering-templates）\n1. 配置文件 （https://github.com/npryce/konfig）\n1. 模块支持\n1. 调试模式\n1. 测试支持\n\n\n路由设计\n-----------------------\n1. 路由扫描（支持类扫描、手动添加两种） OK\n1. 路由匹配 OK\n1. 路由参数 OK\n1. 参数注入 OK\n1. 路由参数转换器\n1. 反向生成路由\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmx1700%2Fwebfun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmx1700%2Fwebfun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmx1700%2Fwebfun/lists"}