MCPcopy Create free account
hub / github.com/Viber/viber-bot-node / Middleware

Function Middleware

lib/middleware.js:7–17  ·  view source on GitHub ↗
(logger, messageValidatorService)

Source from the content-addressed store, hash-verified

5const stream = require('stream');
6
7function Middleware(logger, messageValidatorService) {
8 this._logger = logger;
9 this._stream = this._createStream();
10 this._buffer = null;
11
12 this._app = express();
13 this._app.use(bodyParser.text({ type: "*/*" }));
14
15 this._validateMessageSignature(messageValidatorService);
16 this._configureEndpoints();
17}
18
19Middleware.prototype.getIncoming = function() {
20 return this._app;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected