All Projects → socrateslee → ynm3k

socrateslee / ynm3k

Licence: MIT License
ynm3k.readthedocs.io

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ynm3k

ircpdb
Remotely and collaboratively debug your Python application via an IRC channel.
Stars: ✭ 59 (+195%)
Mutual labels:  debugging
deno-debug
Debugging utility for deno. Ported from https://npmjs.com/debug
Stars: ✭ 15 (-25%)
Mutual labels:  debugging
twilio mock
Mock Twilio gem for Ruby
Stars: ✭ 26 (+30%)
Mutual labels:  mocking
kokkos-tools
Kokkos C++ Performance Portability Programming EcoSystem: Profiling and Debugging Tools
Stars: ✭ 52 (+160%)
Mutual labels:  debugging
docker-pudb
Debug Python code within a Docker container remotely from your terminal using pudb
Stars: ✭ 18 (-10%)
Mutual labels:  debugging
gha
🔧 Test your GitHub Actions workflow locally.
Stars: ✭ 53 (+165%)
Mutual labels:  debugging
SandboxBrowser
A simple iOS sandbox file browser, you can share files through AirDrop
Stars: ✭ 84 (+320%)
Mutual labels:  debugging
pytest-faulthandler
py.test plugin that activates the fault handler module during testing
Stars: ✭ 27 (+35%)
Mutual labels:  debugging
ineeda
Mocking library for TypeScript and JavaScript using Proxies!
Stars: ✭ 53 (+165%)
Mutual labels:  mocking
devmod
Developer Module for debugging web applications
Stars: ✭ 16 (-20%)
Mutual labels:  debugging
spy rb
🔍 Transparent Test Spies for Ruby
Stars: ✭ 28 (+40%)
Mutual labels:  mocking
mocxx
A versatile C++ function mocking framework.
Stars: ✭ 103 (+415%)
Mutual labels:  mocking
use-debugger-hooks
A small package of custom React hooks that are useful for debugging changes in React hook dependencies across renders
Stars: ✭ 44 (+120%)
Mutual labels:  debugging
devtools-tips
A collection of useful cross-browser DevTools tips
Stars: ✭ 81 (+305%)
Mutual labels:  debugging
CrashLogger
A dll injected into process to dump stack when crashing.
Stars: ✭ 19 (-5%)
Mutual labels:  debugging
debugger
Debugging helper for Go
Stars: ✭ 54 (+170%)
Mutual labels:  debugging
mock-spy-module-import
JavaScript import/require module testing do's and don'ts with Jest
Stars: ✭ 40 (+100%)
Mutual labels:  mocking
nala
🦁 Nala - A delightful test framework for C projects.
Stars: ✭ 58 (+190%)
Mutual labels:  mocking
WhatTheStack
See a pretty error screen when your Android app crashes
Stars: ✭ 240 (+1100%)
Mutual labels:  debugging
InAppDevTools
Android library with a collection of tools for debugging, inspecting and reporting from within your own app
Stars: ✭ 26 (+30%)
Mutual labels:  debugging

ynm3k

ynm3k(文档)取名自"要你命3000",目前的功能包括

  • 一个通过完全通过json进行配置的mock调试/反向代理服务器
  • 一个静态文件服务器(除静态目录外,还可以服务zip文件)

安装方法

通过pip安装

sudo pip install ynm3k

基本的使用方法

在8080启动一个mock服务器,根据mock.json的规则进行转发和改写请求

y3k --mock mock.json --port 8080

mock.json的一些例子如下所示:

  • 根据前缀转发请求至不同服务器
[
  ["/api/", "http://example.com/api/"],
  ["/static/my_work.html", "http://127.0.0.1/static/my_work.html"],
  ["/", "http://192.168.1.10:8080/"]
]
  • 为每个请求增加一个特殊的header,比如设置X-Forwarded-For
[
 [{"type": "prefix",
   "path": "/",
   "headers": {"X-Forwarded-For": "1.2.3.4"}},
  {"type": "remote",
   "url": "https://ifcfg.cn/"}
 ]
]
  • 转发某个前缀下的请求到一个本地目录下,并且对于/prefix/dirname/这样的请求自动返回该目录下的index.html的内容
[
    ["/prefix/", {"type": "static",
                  "path": "examples/dir",
                  "try_files": "index.html"}
    ]
]
  • 为每个请求的response,增加一个特殊的header,比如设置Cache-Control
[
   [
      "/",
      {
         "type" : "remote",
         "url" : "https://ifcfg.cn/",
         "headers" : {
            "Cache-Control" : "private"
         }
      }
   ]
]
  • 改写特殊的请求(对于POST /test 这个请求,结果是文件test.json的内容)
[
   [
     {
       "type": "exact",
       "path": "/test",
       "method": "POST"
     },
     {
       "type": "file",
       "body": "test.json",
       "headers": {"content-type": "json"}
     }
   ],
   ["/", "http://192.168.1.10:8080/"]
]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].