vagusX / Koa Proxies
Licence: mit
a [email protected] proxy middleware
Stars: ✭ 125
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Koa Proxies
Trafficlight
🚦 Flexible NodeJS Routing Decorators for API Routing
Stars: ✭ 69 (-44.8%)
Mutual labels: koa, koa2
Vue Socket.io Chat
💬 TypeScript + Vue + Express/Koa + Socket.io
Stars: ✭ 61 (-51.2%)
Mutual labels: koa, koa2
Koa Dec Router
An ES6 decorator + class based router, support inherit, override, priority, auto load controllers, etc.
Stars: ✭ 19 (-84.8%)
Mutual labels: koa, koa2
Koa Mobx React Starter
A straightforward starter for Node javascript web projects. Using Koa, MobX and ReactJS (with universal / isomorphic server rendering)
Stars: ✭ 102 (-18.4%)
Mutual labels: koa, koa2
Mysrv
Yet another Node.js web framework, based on koa.js 又一个 Node.js MVC 框架,基于Koa2
Stars: ✭ 10 (-92%)
Mutual labels: koa, koa2
Postgraphile
GraphQL is a new way of communicating with your server. It eliminates the problems of over- and under-fetching, incorporates strong data types, has built-in introspection, documentation and deprecation capabilities, and is implemented in many programming languages. This all leads to gloriously low-latency user experiences, better developer experiences, and much increased productivity. Because of all this, GraphQL is typically used as a replacement for (or companion to) RESTful API services.
Stars: ✭ 10,967 (+8673.6%)
Mutual labels: koa, koa2
Koa Generator
Koa' application generator for 1.x and 2.x( Express-style and support all middlewares include async/await )
Stars: ✭ 929 (+643.2%)
Mutual labels: koa, koa2
Koatty
Koa2 + Typescript = Koatty. Use Typescript's decorator implement IOC and AOP.
Stars: ✭ 67 (-46.4%)
Mutual labels: koa, koa2
Gracejs
A Nodejs BFF framework, build with koa2(基于koa2的标准前后端分离框架)
Stars: ✭ 1,302 (+941.6%)
Mutual labels: koa, proxy
Strapi
🚀 Open source Node.js Headless CMS to easily build customisable APIs
Stars: ✭ 41,786 (+33328.8%)
Mutual labels: koa, koa2
Koa Proxies
[email protected]/next middlware for http proxy
Powered by http-proxy
.
Installation
$ npm install koa-proxies --save
Options
http-proxy events
options.events = {
error (err, req, res) { },
proxyReq (proxyReq, req, res) { },
proxyRes (proxyRes, req, res) { }
}
log option
// enable log
options.logs = true; // or false
// custom log function
options.logs = (ctx, target) {
console.log('%s - %s %s proxy to -> %s', new Date().toISOString(), ctx.req.method, ctx.req.oldPath, new URL(ctx.req.url, target))
}
Usage
// dependencies
const Koa = require('koa')
const proxy = require('koa-proxies')
const httpsProxyAgent = require('https-proxy-agent')
const app = new Koa()
// middleware
app.use(proxy('/octocat', {
target: 'https://api.github.com/users',
changeOrigin: true,
agent: new httpsProxyAgent('http://1.2.3.4:88'), // if you need or just delete this line
rewrite: path => path.replace(/^\/octocat(\/|\/\w+)?$/, '/vagusx'),
logs: true
}))
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].