Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
raml-mocker-server
Advanced tools
Readme
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.