Giter Site home page Giter Site logo

streamingrat / ratproxy Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 24 KB

A simple reverse proxy for testing AWS lambda functions locally.

Home Page: https://streamingrat.com/news/ratproxy-a-simple-reverse-proxy/

License: MIT License

Go 97.91% Makefile 2.09%
proxy

ratproxy's Introduction

ratproxy

Ratproxy is a simple reverse proxy server to let you simulate something like AWS cloudfront sitting in front of your services.

Installation:

go install github.com/streamingrat/ratproxy@latest

By default ratproxy will use the environment variable RATPROXY_FILENAME to open the config file. If not set uses ratproxy.yaml.

Configuration: You configure the ratproxy with a yaml file like the following, which configures two services listening on two different ports.

ratproxy.yaml

listen: 0.0.0.0:1414
targets:
 - name: server1
   type: lambda
   target: http://localhost:10000
   path: /service1/
 - name: server2
   target: http://localhost:1313
   path: /

ratproxy's People

Contributors

dherbst avatar

Stargazers

 avatar

Watchers

 avatar

ratproxy's Issues

Add admin listener

Add ability to create an admin listener at a port

This will let you look at the request logs, see the config, and change the config and re-write the ratproxy.yaml file.

Add `exec` param to `target` to run a process

In the target section, add exec with a line to run something and capture the logs. The working directory should be relative to the ratproxy.yaml file, with a name exec-working-dir The logs can be seen in the admin listener.

Expected configuration:

listen: 0.0.0.0:1414
targets:
  - name: npm-run-vue-app
    target: http://localhost:5173
    path: /vue/
    exec: npm run dev
    exec-working-dir: ./web/vue-app
  - name: other-target

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.