1 个不稳定版本
0.0.1 | 2020年7月29日 |
---|
#63 在 #forward
15KB
91 代码行
Arxy
Arxy是一个转发代理,可以帮助调用第三方服务的API。它不是一个聚合多个第三方服务的网关,尽管使用类似Juniper(https://github.com/graphql-rust/juniper)的工具添加GraphQL前端并不困难。
Arxy使用Actix-web构建,但它足够简单,可能可以用低级HTTP库构建。
入门
- 通过Cargo安装
cargo install arxy
- 启动arxy
# start with defaults, just echos what was passed through
arxy
# common command line options, please see section on configuration below
arxy -p <port>
arxy -f <path to config>
配置
命令行选项
-p, --port
Listen port. Default to `8080`
-f, --config-file
Path to config file. Default to `./arxy.config.json`
配置文件
一个JSON文件,用于配置服务器和转发路由。请参见arxy.config.json.example
中的示例配置。
依赖项
~30MB
~615K SLoC