@sap/cds-dk
Version:
Command line client and development toolkit for the SAP Cloud Application Programming Model
23 lines (16 loc) • 562 B
JavaScript
const cds = require ('../lib/cds')
const serve = cds._local('@sap/cds/bin/serve')
module.exports = Object.assign (
cds_mock, serve, {help: `
# SYNOPSIS
*cds mock* <service> [<options>]
This command is essentially just a convenience shortcut to
_cds serve --mocked <service> --in-memory? --port 0_
# OPTIONS
- see _cds help serve_
# OPTIONS
`})
function cds_mock (projects, options) {
if (!projects || !projects.length) return this.help('mock')
return serve (projects, { mocked:true, port:'0', 'in-memory?':true, ...options })
}