文件名称:agoo:用于Ruby的高性能HTTP服务器
文件大小:231KB
文件格式:ZIP
更新时间:2024-02-22 21:53:08
ruby rails graphql rack fast
阿古 Ruby的高性能HTTP服务器 用法 架 require 'agoo' Agoo :: Server . init ( 6464 , 'root' ) class MyHandler def call ( req ) [ 200 , { } , [ "hello world" ] ] end end handler = MyHandler . new Agoo :: Server . handle ( :GET , "/hello" , handler ) Agoo :: Server . start ( ) # To run this example type the following then go to a browser and enter a URL # of localhost:6464/hello. # # ruby hello.rb GraphQL require 'agoo' class Query def hello 'hello' end end class Schema attr_reader :query d