GithubHelp home page GithubHelp logo

cwohlman / demeteorizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xervoio/demeteorizer

1.0 0.0 0.0 219 KB

Converts a Meteor app into a "standard" Node.js application.

JavaScript 100.00%

demeteorizer's Introduction

Demeteorizer

CLI tool to convert a Meteor app into a "standard" Node.js application. The 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.

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.

Installing

$ npm install -g demeteorizer

Usage

$ 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.
-n, --node_version <version>  The required version of node [v0.10.25].
-r, --release <version>       The Meteor version. Defaults to latest installed.
-t, --tarball <path>          Output tarball path. If specified, creates a tar.gz of demeteorized application instead of directory.
-a, --app_name <name>         Value to put in the package.json name field. Defaults to the current directory name.
-p, --prerelease              Ignore Meteor prerelease warnings when running bundle.
-d, --debug                   Bundle in debug mode (don't minify, etc).

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

Convert the Meteor app in the current directory, output to ~/meteor-app/converted, and set minimum node version to 0.8.26.

$ demeteorizer -o ~/meteor-app/converted -n v0.8.26

Running Resulting App

Meteor apps make use of the following environment variables:

1. MONGO_URL='mongodb://user:password@host:port/databasename?autoReconnect=true'
2. MAIL_URL='smtp://user:password@mailhost:port/' (optional)
3. ROOT_URL='http://example.com' (optional)
4. PORT=8080 (optional, defaults to 80)

Run the app:

$ cd /your/output/directory
$ npm install
$ node main.js

Full Example

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

$ meteor create --example leaderboard
$ cd leaderboard
$ demeteorizer
$ cd .demeteorized
$ npm install
$ MONGO_URL=[your-url] PORT=8080 node main.js

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 that the application should not be minified.

$ demeteorizer --debug

Support

Demeteorizer has been tested with the current Meteor example apps. If you find an app that doesn't convert correctly, throw an issue in Github - https://github.com/onmodulus/demeteorizer/issues

demeteorizer's People

Contributors

adambrodzinski avatar cwohlman avatar inconceivableduck avatar julianduque avatar lepozepo avatar lukasz-lysik avatar parasj avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.