procfile

0.1.1 • Public • Published

node-procfile

A Procfile parser for node.js.

Installation

Installing npm (node package manager)

  curl http://npmjs.org/install.sh | sh

Installing node-procfile

  [sudo] npm install procfile

Usage

There are two simple methods when using node-procfile: .parse() and .stringify(). If you are familiar with using the native JSON methods in Javascript, there is nothing new about the API.

  var fs = require('fs'),
      procfile = require('procfile');
  
  var data = fs.readFileSync('/path/to/procfile').toString(),
      proc = procfile.parse(data);
  
  console.dir(proc)

This outputs the results of the procfile parse:

  {
    web: {
      command: 'node',
      options: [ 'myapp.js', '-p', '80', '--some-option' ]
    },
    worker: {
      command: 'node',
      options: [ 'myworker.js', '--other-option' ]
    }
  }

Run Tests

  $ vows --spec

Author: Charlie Robbins

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    16
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    16
  • 0.1.0
    0

Package Sidebar

Install

npm i procfile

Weekly Downloads

16

Version

0.1.1

License

none

Last publish

Collaborators

  • indexzero