0.0.1 • Published 8 years ago
veams-bp-mock-api-endpoint v0.0.1
Veams Blueprint :: Mock API Endpoint
With this blueprint you can scaffold a mock api endpoint with following options:
- Which methods do you want to provide by your endpoint?
Setup
- First of all be sure you have installed
veams-cli. - After that be sure your project contains a
veams-cli.json. - Make sure you have updated
veams-cli.jsonto fit the needs of your project. - Install the package with
npm i veams-bp-mock-api-endpoint --save-dev. - Reference the package in
veams-cli.jsonby addingapito theblueprintobject like so:
{
"blueprints": {
"api": {
"skipImports": true,
"prompts": "node_modules/veams-bp-mock-api-endpoint/prompts",
"templates": "node_modules/veams-bp-mock-api-endpoint/templates"
}
}
}Usage
Now you can use this blueprint with veams by executing:
veams add api server/routes/api/articlesThe output in your file system will be:
└── articles
└── controller.js
└── index.js
└── model.js
└── USAGE.mdBe sure to add the snippet in USAGE.md into src/server/routes/api/index.js to register the route.
Have fun!
0.0.1
8 years ago