{"id":47049,"library":"axios-express-proxy","title":"axios-express-proxy","description":"A lightweight package (v1.1.0, no breaking changes yet) that proxies Express requests to Axios and sends back the response. It simplifies forwarding HTTP requests from an Express server to another URL using Axios, handling method, headers, query, and body automatically. Ships TypeScript types. Main differentiator: minimal abstraction over manual Express-to-Axios forwarding, reducing boilerplate while maintaining full control. Release cadence is ad-hoc with no frequent updates. Suitable for simple proxy use cases but lacks advanced features like load balancing or caching found in dedicated proxy libraries.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/yoavrozner/axios-express-proxy","tags":["javascript","typescript"],"install":[{"cmd":"npm install axios-express-proxy","lang":"bash","label":"npm"},{"cmd":"yarn add axios-express-proxy","lang":"bash","label":"yarn"},{"cmd":"pnpm add axios-express-proxy","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"required to make HTTP requests","package":"axios","optional":false},{"reason":"required to handle incoming requests","package":"express","optional":false}],"imports":[{"note":"ESM-only module; CommonJS require will fail. Named export.","wrong":"const Proxy = require('axios-express-proxy').Proxy","symbol":"Proxy","correct":"import { Proxy } from 'axios-express-proxy'"},{"note":"Named export, not default.","wrong":"import SendAxiosRequest from 'axios-express-proxy'","symbol":"SendAxiosRequest","correct":"import { SendAxiosRequest } from 'axios-express-proxy'"},{"note":"ESM-only; named export.","wrong":"require('axios-express-proxy').SendExpressResponse","symbol":"SendExpressResponse","correct":"import { SendExpressResponse } from 'axios-express-proxy'"}],"quickstart":{"code":"import express from 'express';\nimport axios from 'axios';\nimport { Proxy } from 'axios-express-proxy';\n\nconst app = express();\nconst port = 3000;\n\napp.get('/proxy/*', (req, res) => {\n  const targetUrl = 'http://localhost:8080' + req.originalUrl.replace('/proxy', '');\n  Proxy(targetUrl, req, res);\n});\n\napp.listen(port, () => {\n  console.log(`Proxy server listening at http://localhost:${port}`);\n});","lang":"typescript","description":"Creates an Express server that proxies incoming requests to another URL using the Proxy function."},"warnings":[{"fix":"Call Proxy as the final handler; do not attempt to send the response after Proxy returns.","message":"The Proxy function mutates the response object; it's not a middleware that calls next(). You cannot chain multiple proxies or middleware after it.","severity":"gotcha","affected_versions":"*"},{"fix":"Wrap Proxy call in try-catch or attach .catch() to the returned promise.","message":"When using the Proxy function, errors from the target server are not automatically caught. Unhandled rejections may crash the process.","severity":"gotcha","affected_versions":"<=1.1.0"},{"fix":"Pin version in package.json and review changelog before upgrading.","message":"The package does not follow semantic versioning; minor versions may include breaking changes without notice.","severity":"deprecated","affected_versions":"*"},{"fix":"For large responses, consider using http-proxy-middleware instead.","message":"The Proxy function does not support streaming responses; the entire response body is buffered.","severity":"gotcha","affected_versions":"<=1.1.0"},{"fix":"Validate the target URL before passing to Proxy.","message":"The function does not validate the target URL; passing an invalid URL may throw an unhandled error.","severity":"gotcha","affected_versions":"<=1.1.0"}],"env_vars":null,"search_vec":"'abstract':51 'ad':69 'ad-hoc':68 'advanc':83 'anoth':34 'automat':44 'axio':2,18,37,57 'axios-express-proxi':1 'back':21 'balanc':87 'bodi':43 'boilerpl':60 'break':10 'cach':89 'cadenc':66 'case':80 'chang':11 'control':64 'dedic':92 'differenti':49 'express':3,15,31,55 'express-to-axio':54 'featur':84 'forward':26,58 'found':90 'frequent':73 'full':63 'handl':38 'header':40 'hoc':70 'http':27 'javascript':95 'lack':82 'librari':94 'lightweight':6 'like':85 'load':86 'main':48 'maintain':62 'manual':53 'method':39 'minim':50 'packag':7 'proxi':4,14,78,93 'queri':41 'reduc':59 'releas':65 'request':16,28 'respons':23 'send':20 'server':32 'ship':45 'simpl':77 'simplifi':25 'suitabl':75 'type':47 'typescript':46,96 'updat':74 'url':35 'use':36,79 'v1.1.0':8 'yet':12","created_at":"2026-06-07T16:49:30.995839+00:00","updated_at":"2026-06-07T16:49:30.995839+00:00","problems":[{"fix":"Use `import { Proxy } from 'axios-express-proxy';`","cause":"Incorrect import: using default import instead of named import.","error":"TypeError: Proxy is not a function"},{"fix":"Run `npm install axios-express-proxy` and verify package.json.","cause":"Package not installed or typo in package name.","error":"Cannot find module 'axios-express-proxy'"},{"fix":"Ensure the target URL is correct and the server is running.","cause":"Target server is not running or unreachable.","error":"UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED ::1:8080"},{"fix":"Ensure the second argument to Proxy is an Express response object.","cause":"Passing a non-Express response object to Proxy.","error":"TypeError: res.send is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/yoavrozner/axios-express-proxy#readme","github":"https://github.com/yoavrozner/axios-express-proxy","docs":null,"changelog":null,"pypi":null,"npm":"axios-express-proxy","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}