A Mock Server for API Blueprint
npm install api-blueprintnpm install --save-dev api-blueprintpackage.json file: "scripts": {
"mock": "mock"
}
And then simply run: npm run mock
By default it will run, compile and watch for the files in md/ directory. It will be listen to url http://localhost:3000. We place a basic blueprint file as an example with one route. http://localhost:3000/todos will give you a list of todos in JSON format.
"scripts": {
"mock": "mock --path=/Users/
}
Optionally you can share the above Dropbox directory with your team. Each local instance of server will reload if anyone change/add a blueprint file.
--help, -h
Displays help information about this script
'mock.js -h' or 'mock.js --help'
--config, -c
Add the path of an optional configuration file which allows you to set all configurable options in a Node.js module
--watch, -w
Enable/Disable watch mode
--path, -p
Path where to look for Markdown (.md) files
--delay, -d
The network delay in ms
--port, -port
The port where you want the app to listen
- API Blueprint documentation
- Issue Reporting
Matt Jennings