GithubHelp home page GithubHelp logo

auto-proxy's Introduction

Node Auto Proxy

Access your development projects via local domain names instead of port numbers. Auto-assign ports to each of your development projects, without collisions.

Getting started

  1. Direct traffic to localhost. I suggest that you use dnsmasq (brew install dnsmasq) or a similar tool to redirect all requests to a given top-level domain to localhost don't use .dev, use one of the reserved TLDs like .localhost or .test (see here: https://passingcuriosity.com/2013/dnsmasq-dev-osx/, and here https://iyware.com/dont-use-dev-for-development/). Alternatively you can manually edit your hosts file or use folders of localhost (untested). In the future I may offer auto-editing of the hosts file but I'm not yet sure that's a good idea (it would certainly reduce the configuration burden).
  2. Run the server sudo node server.js (note you need sudo to bind to port 80).
  3. Get a port number for your app using the auto tool PORT=$(node auto.js myapp.localhost). Alternatively you can just paste the source of auto.js into your start script.
  4. Run your app using the assigned port number e.g. PORT=$(node auto.js myapp.localhost) node index.js or meteor -p $PORT

Easier use of the auto tool:

If you like you can npm link this package and use the auto.js tool via auto-proxy-get-port from the command line.

auto-proxy's People

Contributors

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