Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@mocks-server/main
Advanced tools
Node.js mock server running live, interactive mocks in place of real APIs. It makes able to define many different responses for a same route, so, you can change the whole mocked API behavior by simply changing the response of one or many routes while the server is running.
Define your mocked API routes in YAML, JSON, JavaScript or TypeScript files. Mocks Server loads them automatically and watches for changes. Defining routes using any of the available APIs is also possible.
Routes can be defined in many ways, from plain objects to plain text and even Express middlewares, and they can act in different ways also, from sending a response to proxy the request to another host.
Configure the server simply modifying the configuration file at the root folder of your project, or use command line arguments, or even environment variables.
For changing options while it is running, you can also use any of the available integrations tools that enable live interactions with Mocks Server.
Providing a Javascript API, an interactive command line interface and a REST API for changing the responses of the mocked API while it is running, it is easy to use both for development and testing. Tools providing integrations with other ecosystems are also available, such as Cypress commands.
To check out docs, visit www.mocks-server.org.
Project | Status | Description |
---|---|---|
main | Main distribution. It includes all plugins preinstalled | |
core | Pluggable core. It can be used programmatically also | |
plugin-admin-api | Plugin providing an administration REST API | |
plugin-inquirer-cli | Plugin providing an administration interactive CLI | |
plugin-openapi | Plugin allowing to create routes and collections from OpenApi definitions | |
plugin-proxy | Plugin providing Proxy route handler | |
admin-api-client | API client for plugin-admin-api | |
admin-api-client-data-provider | API client for plugin-admin-api built using data-provider | |
admin-api-paths | Definition of plugin-admin-api routes | |
cypress-commands | Cypress commands to administrate Mocks Server | |
config | Provides configuration to core components and plugins | |
nested-collections | Nested collections manager. Used to provide alert namespaces to plugins | |
logger | Winston-based logger with namespaces and events emitter |
Contributors are welcome. Please read the contributing guidelines and code of conduct.
FAQs
Mock Server supporting multiple route variants and mocks
The npm package @mocks-server/main receives a total of 27,726 weekly downloads. As such, @mocks-server/main popularity was classified as popular.
We found that @mocks-server/main demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.