Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding cli capability for running as daemon:

`palsu config.json -d`
  • Loading branch information...
commit b12c9f75435976c97bca4da30ce7a8f40847ac23 1 parent 44a9b7d
Szaby Grünwald authored
Showing with 29 additions and 2 deletions.
  1. +19 −0 bin/palsu
  2. +10 −2 package.json
View
19 bin/palsu
@@ -0,0 +1,19 @@
+#!/usr/bin/env coffee
+palsuRoot = "#{__dirname}/.."
+cli = require "cli"
+
+cli.enable "help"
+cli.enable "version"
+cli.enable "glob"
+cli.enable "daemon"
+cli.setApp "#{palsuRoot}/package.json"
+
+# Non-interactive processing
+cli.parse
+ listen: ['l', 'Start palsu server on this port', 'number']
+palsu = require "palsu-app"
+
+cli.main (args, options) ->
+ cli.args.shift()
+ return unless cli.args.length
+
View
12 package.json
@@ -2,11 +2,17 @@
"name": "palsu-app",
"version": "0.0.1",
"description": "Palsu meeting tool -- http://palsu.me",
-"main": "package.js",
+"main": "./nodejs/palsu",
"keywords": [
"IKS project",
"VIE"
],
+"engines": {
+ "node": ">=0.4.0"
+},
+"bin" : {
+ "palsu" : "./bin/palsu"
+ },
"repository" : {
"type" : "git",
"url" : "https://github.com/bergie/ViePalsu.git"
@@ -28,7 +34,9 @@
"socket.io" : "0.7.9",
"socket.io-connect" : "0.2.2",
"system" : "0.1.0",
- "underscore" : "1.1.7"
+ "underscore" : "1.1.7",
+ "cli" : "*",
+ "daemon" : "*"
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.