
var Mariaws = require("./mariawa.js")

Mariaws.log(arg("log"))

var stop = Mariaws.start({
  ws_port: arg("ws-port"),
  sql_port: arg("sql-port"),
  sql_host: arg("sql-host"),
  heartrate: arg("heartrate")
})

process.on("SIGINT", stop)
process.on("SIGTERM", stop)

function arg (name) {
  var key = name+"="
  for (var i=0; i<process.argv.length; i++) {
    if (process.argv[i].indexOf(key) === 0) {
      return process.argv[i].replace(key)
    }
  }
  return null
}

@@ -204,16 +204,17 @@
 e%22)%0A%7D)%0A%0A
+%0A
 process.
@@ -261,16 +261,17 @@
  stop)%0A%0A
+%0A
 function

test npm