github.com/orangenpresse/up@v0.6.0/CONTRIBUTING.md (about)

     1  # Contributing
     2  
     3  Before contributing to Up you'll need a few things:
     4  
     5  - Install [Golang 1.9](https://golang.org/dl/) for that Go thing if you don't have it
     6  - Install [golang/dep](https://github.com/golang/dep) for dependency management
     7  
     8  The following are optional:
     9  
    10  - Install [pointlander/peg](https://github.com/pointlander/peg) if you're working on the log grammar
    11  - Install [jteeuwen/go-bindata](https://github.com/jteeuwen/go-bindata) if you need to bake `up-proxy` into `up`
    12  - Or run `make install.deps` to grab these tools
    13  
    14  ## Setup
    15  
    16  Grab Up:
    17  
    18  ```
    19  $ go get github.com/apex/up
    20  ```
    21  
    22  Change into the project:
    23  
    24  ```
    25  $ cd $GOPATH/src/github.com/apex/up
    26  ```
    27  
    28  Grab the dependencies:
    29  
    30  ```
    31  $ dep ensure
    32  ```
    33  
    34  Grab the dev dependencies:
    35  
    36  ```
    37  make install.deps
    38  ```
    39  
    40  ## Testing
    41  
    42  ```
    43  $ make test
    44  ```
    45  
    46  ## Layout
    47  
    48  Although Up is not provided as a library it is structured as if it was, for organizational purposes. The project layout is loosely:
    49  
    50  - *.go – Primary API
    51  - [reporter](reporter) – Event based CLI reporting
    52  - [platform](platform) – Platform specifics (AWS Lambda, Azure, Google, etc)
    53  - [internal](internal) – Internal utilities and lower level tooling
    54  - [http](http) – HTTP middleware for up-proxy
    55  - [handler](handler) – HTTP middleware aggregate, effectively the entire proxy
    56  - [docs](docs) – Documentation used to generate the static site
    57  - [config](config) – Configuration structures and validation for `up.json`
    58  - [cmd](cmd) – Commands, where `up` is the CLI and `up-proxy` is serving requests in production
    59  
    60  Note that this is just a first past, and the code / layout will be refactored. View [Godoc](http://godoc.org/github.com/apex/up) for more details of the internals.
    61  
    62  ## Proxy
    63  
    64  One oddity is that the `up-proxy` is baked into `up`. Yes there's a binary within the binary :) – this is so `up` can inject the proxy before deploying your function to Lambda.
    65  
    66  The proxy accepts AWS Lambda events from API Gateway, translates them to HTTP, and sends a request to your application, then translates it back to an event that API Gateway understands.
    67  
    68  Reverse proxy features such as URL rewriting, gzip compression, script injection, error pages and others are also provided in `up-proxy`.
    69  
    70  ## Roadmap
    71  
    72  Up uses GitHub issue tracking and milestones for its loose roadmap. I highly recommend installing Zenhub (https://www.zenhub.com/) as well, however I primarily organize by milestones and labels for now.
    73  
    74  ## Releases
    75  
    76  Notes for myself:
    77  
    78  - Run `make build` if necessary to re-build the proxy
    79  - Run `git changelog`
    80  - Run `git release`
    81  - Run `make release`
    82  - Re-build documentation
    83  - Notes about any backwards compat issues, migration, IAM policy changes
    84  - Adjust schemastore JSON schema if necessary