Skip to content

Commit

Permalink
Introduce the --app key (alias to --git). Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
chikh committed Aug 13, 2015
1 parent c538628 commit 1e1aa0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ git commit -m "Initial commit"
Then run it with

```
allcountjs --git file://<path to allcountjs-helloworld> --db mongodb://localhost:27017/allcountjs-helloworld
allcountjs --app <path or URL> --db mongodb://localhost:27017/allcountjs-helloworld
```

`<path or URL>` can be regular path to the directory where application located (e.g. `./` or `/home/user/allcountjs-helloworld`) or URL (e.g. `file:///home/user/allcountjs-helloworld` or `https://github.com/user/my-app.git`). It doesn't matter whether `<path or URL>` points to regular directory or Git repository.

Please note that MongoDB should be running in order to run this example.

# License
Expand Down
4 changes: 2 additions & 2 deletions allcount.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ var _ = require('lodash');
var fs = require('fs');

var port = argv.port || process.env.PORT || 9080;
var gitUrl = argv.git || process.env.GIT_URL;
var gitUrl = argv.app || process.env.APP || argv.git || process.env.GIT_URL;
var dbUrl = argv.db || process.env.DB_URL;

if (!gitUrl || !dbUrl) {
console.log('Usage: allcountjs --git <Application Git URL> --db <Application MongoDB URL> -port [Application HTTP port]');
console.log('Usage: allcountjs --app <Path to application\'s dir or Git URL> --db <Application MongoDB URL> -port [Application HTTP port]');
process.exit(0);
}

Expand Down

0 comments on commit 1e1aa0f

Please sign in to comment.