SAP-BTP-Spielwiese/app1/node_modules/request-stats/index.js
Markus Rettig 775ac7b58c completed step 3 from the tutorial
you must login with an BTP account in order to see the app
2024-02-08 16:13:36 +01:00

11 lines
358 B
JavaScript

'use strict'
var http = require('http')
var StatsEmitter = require('./lib/stats_emitter')
module.exports = function (req, res, onStats) {
var statsEmitter = new StatsEmitter()
if (req instanceof http.Server) statsEmitter._server(req, res)
else if (req instanceof http.IncomingMessage) statsEmitter._request(req, res, onStats)
return statsEmitter
}