
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
raml-mocker-server
Advanced tools
Node module to run server mocking API described in RAML files
This plugin make use of raml-mocker module. It run a Express server and configure endpoints and responce from RAML files.
Basic, this will create server on port 3030
var api = require('raml-mocker-server');
var options = {
path: 'test/raml' // path to folder with RAML files
};
var callback = function (app){
// Express app could be used to configure more paths
console.log('All RAML files parsed and API endpoints defined');
};
// returns created server
var server = api(options, callback);
Add API to existing web server:
Name | Type | Default value | Description |
---|---|---|---|
port | number | 3030 | defines server port |
path | string | 'raml' | path to raml folder, relative to the execution context |
prefix | string, array | '' | prefixing all API endpoints described in RAML |
debug | boolean | enable logging debug info to the console | |
watch | boolean | enable watching on RAML files | |
staticPath | string | defines path to the static folder | |
prioritizeBy | string | 'schema' | defines the priority of the endpoint response if both 'schema' and 'example' are defined |
app | object | if server already exists you can pass express app, Express app, no need to specify port and staticPath |
FAQs
Node module to run server mocking API described in RAML files
The npm package raml-mocker-server receives a total of 14 weekly downloads. As such, raml-mocker-server popularity was classified as not popular.
We found that raml-mocker-server 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.