Rackla 是构建 API 网关的开源框架。
在mix.exs中,添加:rackla和:cowboy作为依赖项:
defp deps do [ {:rackla, "~> 1.2"}, {:cowboy, "~> 1.0"} # Or your web server of choice (which works with Plug) ] end
并添加:rackla和:cowboy到应用程序:
def application do [applications: [:logger, :rackla, :cowboy]] end