Reverse proxy for test doubles
npm install peekaboo-server:ghost: peekaboo-server is a reverse proxy for test doubles, for easily stub backend http/s calls, agnostically to its architecture.
Inspired by polly.js, anyproxy, mitmproxy, mockserver, wiremock, lightproxy, Google Chrome DevTools Network panel and maybe more.
Batteries included.
!main
!edit
``bash`
npm i -g peekaboo-server
peekaboo-server
`bash`
curl @todo request first time
curl @todo request with cache
When server is running, it provide its ui interface at /
@todo screenshot
@todo
Running with https can also allow to use peekaboo-server with mobile applications.
@todo
`bash`
peekaboo-server --settings stub-my-app.js
custom settings from my-app.js and override at runtime with env vars
`bash`
APP_PORT=9123 LOG_LEVEL=debug peekaboo-server --settings my-app.js
available env vars
- APP_PORT, default 8080warn
- LOG_LEVEL, default false
- LOG_PRETTY, default 20000
- RELAY_TIMEOUT, default
@todo
server
`bash`
npm start
ui
`bash`
cd src/ui
npm run serve
build
`bash``
npm run build
Any contribution is welcome! You can propose a PR or open an issue and explain what you are going to do.
---
The MIT License (MIT)
Copyright (c) 2020 Simone Sanfratello
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.