文件名称:router-simple.cr:受路由器启发的简单路径路由器
文件大小:6KB
文件格式:ZIP
更新时间:2024-05-20 14:54:57
Crystal
简单的路由器 受启发的简单路径路由器。 安装 将其添加到Projectfile deps do github " karupanerura/router-simple.cr " end 用法 require " router-simple " dispatcher = Router :: Simple :: Dispatcher ( Hash ( Symbol , String )).new() dispatcher.add( " / " , { :controller => " Root " , :action => " index " , }) dispatcher.add( " /users/:user_id " , { :controller => " Users " , :action => " fetch_by_id " , }) disp
【文件预览】:
router-simple.cr-master
----.travis.yml(185B)
----Projectfile(12B)
----LICENSE(1KB)
----src()
--------router-simple.cr(705B)
--------router-simple()
----spec()
--------router-simple_spec.cr(5KB)
--------spec_helper.cr(46B)
----.gitignore(146B)
----README.md(1KB)