Git Product home page Git Product logo

recharge's Introduction

Recharge

A utility written in Go to provide reloading for Go HTTP applications.

About

recharge watches a Go project for changes and rebuilds the target application when changes occur. recharge operates by providing a proxy through to th target application which coordinates the building and running of the target application while being transparent to the user.

Installing

go get -u github.com/keysolutions/recharge

Configuration

recharge uses a TOML configuation file to assign project-specific options. An example configuration file is found in this repository under the name recharge.conf.

RootDir = "."
Build = "go build -o ./demo/demo ./demo"
Run = "./demo/demo"
SourceAddr = ":3000"
TargetAddr = ":3001"

Possible configuration options:

Attribute Description Default Required
RootDir The project directory .
Build The command used to build the project _
Run The command used to run the project _
SourceAddr The HTTP listen address :3000
TargetAddr The listen address of the target application :3001

If bash or sh is available on the system the build and run commands will be executed as bash -c "$COMMAND" to give greater flexibility in creating build and run command rules. When they are not available the command will fall back to being executed directly using Go's exec.Command functionality. Authors of recharge.conf files should be aware of the limitations of various systems that their projects may be run on.

Example

recharge contains a demo application in the demo directory which is ready to be used with the included recharge.conf. Simply start the recharge application in its project root to see it in action.

recharge's People

Contributors

adamkeys avatar

Watchers

 avatar  avatar

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.