Skip to content

Commit e3e4cda

Browse files
author
Richard Connon
committed
Remove FN_FORMAT variable handling
1 parent da5b48e commit e3e4cda

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

fn-fdk.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,7 @@ const fnFunctionExceptionMessage = 'Exception in function, consult logs for deta
2424
* @param fnfunction {fnHandler} the function to invoke
2525
* @param options {object}
2626
*/
27-
exports.handle = function (fnfunction, options) {
28-
let fnFormat = process.env['FN_FORMAT'] || ''
29-
let fdkHandler
30-
31-
// format has been explicitly specified
32-
switch (fnFormat.toLowerCase()) {
33-
case 'http-stream':
34-
fdkHandler = handleHTTPStream
35-
break
36-
default:
37-
console.warn(
38-
`The Node.js FDK does not support the '${fnFormat}' format, change the function format to 'http-stream'. Exiting)`)
39-
process.exit(2)
40-
}
41-
42-
return fdkHandler(fnfunction, options)
43-
}
27+
exports.handle = handleHTTPStream
4428

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

0 commit comments

Comments
 (0)