The one-liner node.js proxy middleware for connect, express, next.js and more
92
Pending
Does it follow best practices?
Impact
92%
1.24xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
Build a proxy server that forwards POST requests to a backend service while using body-parser middleware to log request details.
The proxy server should:
/api/submit endpointThe server must correctly proxy POST requests even though body-parser consumes the request stream. The proxied requests should arrive at the backend with the correct body content and appropriate Content-Length headers.
@generates
/**
* Creates and starts an Express server that proxies POST requests to a backend.
*
* @param {Object} config - Server configuration
* @param {number} config.port - Port for the proxy server to listen on
* @param {string} config.backendUrl - URL of the backend server to proxy to
* @returns {Object} Express app instance
*/
function createProxyServer(config) {
// Implementation here
}
module.exports = { createProxyServer };Provides web server framework.
@satisfied-by
Provides request body parsing middleware.
@satisfied-by
Provides HTTP proxy middleware with request body handling support.
@satisfied-by
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10