Skip to content

Commit

Permalink
updates readme
Browse files Browse the repository at this point in the history
Adds all of the correct options and updates examples to match the new
output structure. Adds a section on how demeteorizer works.
  • Loading branch information
Matt Hernandez committed Sep 3, 2015
1 parent fff92fa commit 0347579
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ resulting app contains a package.json file with all required dependencies and
can be easily ported to your own servers or
[Node.js PAAS providers](https://github.com/joyent/node/wiki/Node-Hosting).

Demeteorizer's output is similar to `meteor bundle` except that it generates a
package.json containing all required dependencies. This allows you to easily
run `npm install` on the destination server, which is especially important for
compiled modules.
Note that version 3 of Demteorizer changes the output structure, which may cause
issues depending on how/where you are deploying your application. With the new
structure, the generated node application is available in
`bundle/programs/server`.

## How Demeteorizer Works

Demeteorizer bundles your Meteor application using `meteor build` then updates
the generated `package.json` to include all of the necessary properties for
running the application on a PaaS provider.

## Installing

Expand All @@ -24,11 +30,12 @@ Install Demeteorizer globally using npm
$ cd /path/to/meteor/app
$ demeteorizer [options]

-h, --help output usage information
-V, --version output the version number
-o, --output <path> Output folder for converted application. Defaults to .demeteorized.
-j, --json <json> JSON data to be merged into the generated package.json

-h, --help output usage information
-V, --version output the version number
-o, --output <path> Output folder for converted application [.demeteorized]
-a, --architecture <arch> Build architecture to be generated
-d, --debug Build the application in debug mode (don't minify, etc)
-j, --json <json> JSON data to be merged into the generated package.json

## Windows Support

Expand All @@ -48,17 +55,6 @@ of Demeteorizer.
This is because the `bundle` command changed in 0.9 which makes backward
compatibility impossible. :(

## Examples

Convert the Meteor app in the current directory and output to `./.demeteorized`

$ demeteorizer

Convert the Meteor app in the current directory and output to
`~/meteor-app/converted`

$ demeteorizer -o ~/meteor-app/converted

## Running Resulting Application

Meteor applications make use of the following environment variables:
Expand All @@ -74,20 +70,31 @@ MongoDB [installed](http://docs.mongodb.org/manual/installation/) and running.

Run the app:

$ cd /your/output/directory
$ cd /your/output/directory/bundle/programs/server
$ npm install
$ MONGO_URL=mongodb://localhost:27017/test PORT=8080 ROOT_URL=http://localhost:8080 node main
$ MONGO_URL=mongodb://localhost:27017/test PORT=8080 ROOT_URL=http://localhost:8080 npm start

## Full Example
## Examples

Convert the Meteor app in the current directory and output to `./.demeteorized`

$ demeteorizer

Convert the Meteor app in the current directory and output to
`~/meteor-app/converted`

$ demeteorizer -o ~/meteor-app/converted

The following steps will create a Meteor example app, convert it, and run it.

$ meteor create --example leaderboard
$ cd leaderboard
$ demeteorizer
$ cd .demeteorized
$ cd .demeteorized/bundle/programs/server
$ npm install
$ MONGO_URL=[your-url] PORT=8080 ROOT_URL=http://localhost:8080 node main.js
$ MONGO_URL=mongodb://localhost:27017/test PORT=8080 ROOT_URL=http://localhost:8080 npm start

Visit http://localhost:8080 in your browser.

## Modifying the Generated package.json

Expand Down Expand Up @@ -121,16 +128,9 @@ You can also use this to override settings

This will result in a package.json with the node engine set to 0.12.x.

## Tarball

The --tarball option can be used to create a tar.gz of the application instead
of putting the converted app in a directory.

$ demeteorizer --tarball /path/to/tarball.tar.gz

## Debug

The --debug option is passed to the meteor bundle command indicating to meteor
The --debug option is passed to the meteor build command indicating to meteor
that the application should not be minified.

$ demeteorizer --debug
Expand All @@ -142,6 +142,7 @@ an app that doesn't convert correctly, throw an issue in Github -
[https://github.com/onmodulus/demeteorizer/issues](https://github.com/onmodulus/demeteorizer/issues)

## Release History

See [releases](https://github.com/onmodulus/demeteorizer/releases).

## License
Expand Down

0 comments on commit 0347579

Please sign in to comment.