Skip to content

Commit

Permalink
Remove FN_FORMAT variable handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Connon committed Nov 16, 2018
1 parent da5b48e commit e3e4cda
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions fn-fdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,7 @@ const fnFunctionExceptionMessage = 'Exception in function, consult logs for deta
* @param fnfunction {fnHandler} the function to invoke
* @param options {object}
*/
exports.handle = function (fnfunction, options) {
let fnFormat = process.env['FN_FORMAT'] || ''
let fdkHandler

// format has been explicitly specified
switch (fnFormat.toLowerCase()) {
case 'http-stream':
fdkHandler = handleHTTPStream
break
default:
console.warn(
`The Node.js FDK does not support the '${fnFormat}' format, change the function format to 'http-stream'. Exiting)`)
process.exit(2)
}

return fdkHandler(fnfunction, options)
}
exports.handle = handleHTTPStream

/**
* A function result = this causes the handler wrapper to use a specific response writer
Expand Down

0 comments on commit e3e4cda

Please sign in to comment.