grape-vs-martini:比较 Ruby 的 Grape 和 Golang 的 Martini for Web API Server

时间:2021-06-10 23:52:06
【文件属性】:
文件名称:grape-vs-martini:比较 Ruby 的 Grape 和 Golang 的 Martini for Web API Server
文件大小:69KB
文件格式:ZIP
更新时间:2021-06-10 23:52:06
Ruby 葡萄与马提尼 将 Ruby 的 Web 框架与 Go 中的 Web 框架进行比较的 API 服务器示例 响应以下路由: GET /projects(.json) GET /project/:id(.json) 响应格式如下: {"status": "Success", "data": [...]} {"status": "Fail", "error_message": "Bad api key"} curl命令示例如下: curl "http://127.0.0.1:8080/projects?key=61c2339c1bc92bc48120b55513cd568b" 对于 Grape, rack app使用端口9292 , rails app默认使用端口3000 。 对于 Martini,使用端口8080 。 如何运行服务器 葡萄示例 在grape-example有两个文件
【文件预览】:
grape-vs-martini-master
----.gitignore(9B)
----martini-example()
--------server.go(2KB)
--------entry.go(1KB)
----README.md(4KB)
----grape-example()
--------grape-on-rails()
--------grape-on-rack()
----grape_vs_martini_api.sql(43KB)

网友评论