GithubHelp home page GithubHelp logo

binder-proxy's Introduction

Binder proxy for faster frontend development

This proxy helps to work faster and more productive with binder frontend development.

You will get higher productivity because:

  • PHP loads static files synchronously (or with some instances at aws sandbox)
  • It takes some time to upload your code to aws sandbox
  • Files served faster from local then from remote in America :-)

All you have to do is use this proxy which makes all project's css/js files serve locally and all other requests will be passed to sandbox/dev instance. Also, you can configure or add any other logic for paths you need (for e.g. mocks).

Installation

Mac OS X/Ubuntu

This systems comes with bundled Python 2.7 so you can use it (but I highly recommend to use Python 3 :-)).

  • clone this repo and run the following commands in terminal at this repo directory
  • make sure you have pip installed: Ubuntu: sudo apt-get install python-pip, Mac: sudo easy_install pip
  • run sudo pip install -r requirements.txt (if you know what virtualenv is and using it, run this command without sudo)
  • that's all ;-)

Windows

  • go at https://www.python.org/downloads/windows/ and download/install 3.4.x version (there should be an installer)
  • don't forget to check Add python.exe to Path checkbox
  • clone this repo and run the following commands in terminal (cmd.exe) at this repo directory
  • run pip install -r requirements.txt
  • done :-)

Usage

Run:

python proxy.py --static_path=<your_binder_path>/web --proxy_url=<url_to_your_binder>

For example:

python proxy.py --static_path=../profile-search-ui/web --proxy_url=http://sandbox1.agate.upwork.com:32819

Proxy url could be any url (local, sandbox, dev) to your instance.

After that you can go http://127.0.0.1:9999 and you are done :) For e.g. profile-search path would be http://127.0.0.1:9999/o/profiles/browse/

Also you can put all this command line arguments to config/local.cfg file. All available arguments are available with python proxy.py --help.

So, now you need to just run grunt watch to monitor and rebuild your js/css changes and they would be automatically served.

This proxy uses tortik and if you want to see some magic just add debug parameter to the url, for e.g. http://127.0.0.1:9999/o/profiles/browse/?debug.

binder-proxy's People

Contributors

glibin 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.