V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
PrivateRookie
V2EX  ›  Rust

用 actix-web 2.0 写的一个小工具

  •  
  •   PrivateRookie · 2019-12-24 18:13:50 +08:00 · 3481 次点击
    这是一个创建于 1577 天前的主题,其中的信息可能已经有所发展或是发生改变。

    偶然看到一个 Json server 的 Rust 库 weld. 感觉挺好玩的, 但是代码比较老了, 试着用 actix-web 2.0 和 serde_json 重新实现了一个, 代码更简单了.

    项目地址: mockrs

    使用说明:

    cargo install --git https://github.com/PrivateRookie/mockrs.git
    
    mockrs --help
    
    mockrs 0.1.0
    PrivateRookie <[email protected]>
    a mock restful json http server
    
    USAGE:
        mockrs [OPTIONS] <db-file>
    
    FLAGS:
        -h, --help       Prints help information
        -V, --version    Prints version information
    
    OPTIONS:
            --host <host>    listen ip [env: MOCKRS_HOST=]  [default: 127.0.0.1]
            --port <port>    listen port [env: MOCKRS_PORT=9002]  [default: 9000]
    
    ARGS:
        <db-file>    json file as database [env: MOCKRS_DB_FILE=]
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3078 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 144ms · UTC 14:36 · PVG 22:36 · LAX 07:36 · JFK 10:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.