Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
proxyStart = async () => {
// create the bespoken config file if properties are specified in serverless config
await this.loadBespokenPluginConfig();
// initialize the bespoken cli
await Global.initializeCLI();
// enable verbose logging
LoggingHelper.setVerbose(true);
// ensure environment variables from serverless config are set
mutateProcessEnvironmentVariables(
this.environmentVariablesFromServerlessConfig
);
// create the lambda proxy
if (this.withPassThruRoutingOption == null) {
// run local server in 'single function mode' -- all requests are dispatched to a single lambda specified either on command line or
// by choosing first function from serverless config ...
const handler = extractHandlerObject(
this.functionsFromServerlessConfig,
this.selectedFunctionFromCommandLine