Run and serve your web apps in .dev domains on your develop machine.
This project is inspired by:
Make sure they listen to the HTTP port number specified in the
from https://github.com/layerssss/bnb
This project is inspired by:
- 37 Signals' Pow (Rack, OS X only)
- typicode/hotel
- Full-fledged / operable terminal (powered by battle-hardened node-pty and xterm.js)
- Also shipped as an Electron / GUI app (available on Linux / OS X / Windows)
- Robust state control (easily and reliably restarting app when needed)
- Proxy all network request (so you don't have to setup proxy auto-config, just use the single proxy, makes it easy for cross-projects API invocation)
- Self-signed SSL connection (with correct SAN so it produces a 'greenlock' after marking CA trusted manually)
- Set a timeout option so application will be automatically shutdown
Install
If you prefer launching and keeping it by CLI, thennpm install bnb -g
bnb server
... or if you prefer launching it as a GUI staying as a tray icon, download the latest release.Usage
Configure your brower to usehttp://localhost:2999
as HTTP/HTTPS proxy. Then add your apps in http://bnb.dev/ (or in GUI), specifying the directory and the command to run your application.Make sure they listen to the HTTP port number specified in the
PORT
enviroment variable. Here are some examples commands:ember server
jekyll server
rails server --port $PORT --bind 127.0.0.1
--bind 127.0.0.1
is for OSX otherwise rails will be using a special localhost socket which is not accessible by Node.js APIpython -m SimpleHTTPServer $PORT
php -S 127.0.0.1:$PORT
.dev
domain. bnb
will launch your app for you.Self-signed SSL
bnb
generates a self-signed CA key-pair and stores it with other data at ~/.bnb.json
. Then it signs SSL certificate for each .dev
domain when requested. So SSL works out of box, just by going to https://my-app.dev/
. But if want to see a 'greenlock', i.e. to make your browser trust bnb
, you need to mark your self-signed CA as trusted in browser or OS.from https://github.com/layerssss/bnb
No comments:
Post a Comment