/ichigo

Reverse proxy for development

Primary LanguageTypeScriptMIT LicenseMIT

ichigo

Reverse proxy for development

Install

go get github.com/wacul/ichigo

For Homebrew user:

brew install wacul/tap/ichigo

Usage

ichigo [-c <file>|--config=<file>]

# Options:
#   -c <file>, --config=<file>    A file contains configurations (YAML). Default: config.yaml

Sample config.yaml

addr: :8000
origins: # sources
  - name: back
    endpoints: # destinations
      - key: local
        url: http://127.0.0.1:3000
      - key: develop
        url: http://127.0.0.1:3001
      - key: prerelease
        url: http://127.0.0.1:3002
      - key: production
        url: http://example.com
    endpointKey: local # default endpoint key for "back"
  - name: front
    endpoints: # destinations
      - key: local
        url: http://127.0.0.1:4000
      - key: develop
        url: http://127.0.0.1:4001
      - key: production
        url: http://example.com
    endpointKey: local # default endpoint key for "front"
api:
  pathPrefix: /_proxy
behaviors:
- pathPrefix: /api.v1
  originKey: back
- pathPrefix: /api.v2
  originKey: back
- pathPrefix: /
  originKey: front
startPath: /index.html 

Contribution

Setup for dev

npm install gulp
npm install
go generate

Release Cycle

  • Send pull-request if you needed
  • Owners merge it to default branch if it passes all tests
  • CI passed all tests and release tests
  • Owners Call Release action
    • It tests codes, puts a new tag and make a release

LICENSE

MIT License

This is distributed under the MIT License.