node package manager


What is fraggle

A command line utility to deploy different versions of nodejs applications. You define a main host (i.e: and you can deploy different versions of your app, each one in its own subdomain (i.e:, and so on). Fraggle then:

  • Downloads the source code and changes the working directory to a given version (usually a tagged commit). At this moment only git repositories are supported.
  • Changes the proxy configuration to add the new host with that version. At this moment only haproxy is supported.

Getting started

You can install fraggle with `npm``

npm install fraggle -g

Create a new directory. For example services

mkdir services

Create an empty configuration file

echo '{}' > config.json

Create a haproxy.ejs template. You can use this example. Save (and modify if you want) the template as haproxy.ejs in the current directory.


Adding services

To add a service to the configuration file. Use:

fraggle add <domain> <repo> <executable-file>

For example:

fraggle add server.js

The executable file will be invoked with the port number in which it should listen as the frist parameter.

At this moment nothing is running. You just added a service to the configuration file. Now you need to deploy a version.

Deploying versions

To deploy a new version just use:

fraggle deploy <tag>.<domain>

For example:

fraggle deploy

This will download the source code of the repository in a new directory: repos/ checking out the given tag ('1' in this case). Fraggle will run the with an available port as first parameter, and will restar the proxy with the new configuration. It uses forever to keep it running forever :) And log files are stored inside the logs directory that will be created if does not exist.

At this moment you can browse to see the new deployed version.

Marking a version as the default one

Now you would want to have some version serving at You just need to use:

fraggle default <tag>.<domain>

For example:

fraggle default

So you now can browse

Deleting versions

If you want to delete a version, you just need to do the following:

fraggle delete <tag>.<domain>

For example:

fraggle delete

Fraggle will stop the service, and it also will delete the application directory and will restart the proxy with the new configuration.

Listing active services

You can list the active services by simply using:

fraggle list

It will show you the configured domains, with their versions, the port where they are running, and which of them is the default version (marked as PROD in the listing).