Access versions of your node.js application on demand
GPL-2.0 License
This project has been deprecated and replaced by DServe. Check that out instead.
A proxy server which checkouts a branch of your web application and runs it on demand.
Clone this repository and install the dependencies:
git clone https://github.com/Automattic/calypso-live-branches.git
cd calypso-live-branches
npm install
Run your app with node lib/index.js <URL_TO_YOUR_REPOSITORY>
.
If your packages.json
has all the information to build and run your app chances are it might just work. Otherwise you can create a new JSON file whose config will overwrite your package.json
and run it with:
node lib/index.js my-config.json
For instance in Calypso we use make build
to build our app and since it itself calls npm install
we cannot use the default preinstall
or postinstall
hooks. So calypso-live-branches
looks for the special scripts.build
attribute. See calypso.json
for an exemple of configuration.
Finally, use the watchDirs
option if you want to avoid restarting your app on each change.
Run it with make run
worker.js
(ie make build
and require('build/bundle-development.js');
).require
to launch the server with the patch on net.Server.listen
(needed so we can proxy it); have a look at node-sandboxed-module
.