<commit_before>'use strict'

const colors = require('colors')
const daemon = require('deepstream.io-service/src/daemon')

module.exports = function (program) {
  program
    .command('daemon')
    .description('start a daemon for deepstream server')

    .option('-c, --config [file]', 'configuration file, parent directory will be used as prefix for other config files')
    .option('-l, --lib-dir [directory]', 'path where to lookup for plugins like connectors and logger')

    .option('--server-name <name>', 'Each server within a cluster needs a unique name')
    .option('--host <host>', 'host for the HTTP/websocket server')
    .option('--port <port>', 'port for the HTTP/websocket server')
    .option('--disable-auth', 'Force deepstream to use "none" auth type')
    .option('--disable-permissions', 'Force deepstream to use "none" permissions')
    .option('--log-level <level>', 'Log messages with this level and above')
    .action(action)
}

function action () {
  daemon.start({
    processExec: `${__dirname}/deepstream`
  })
}<commit_msg>fix: fixing daemon for nexe/service<commit_after>'use strict'

const colors = require('colors')
const daemon = require('deepstream.io-service/src/daemon')

module.exports = function (program) {
  program
    .command('daemon')
    .description('start a daemon for deepstream server')

    .option('-c, --config [file]', 'configuration file, parent directory will be used as prefix for other config files')
    .option('-l, --lib-dir [directory]', 'path where to lookup for plugins like connectors and logger')

    .option('--server-name <name>', 'Each server within a cluster needs a unique name')
    .option('--host <host>', 'host for the HTTP/websocket server')
    .option('--port <port>', 'port for the HTTP/websocket server')
    .option('--disable-auth', 'Force deepstream to use "none" auth type')
    .option('--disable-permissions', 'Force deepstream to use "none" permissions')
    .option('--log-level <level>', 'Log messages with this level and above')
    .action(action)
}

function action () {
  let processExec
  try {
    require('nexeres')
    processExec = process.argv[0]
  } catch (e) {
    processExec = process.argv[1]
  }

  daemon.start({ processExec })
}
{'fraction_non_alphanumeric': 0.1506481895395619, 'fraction_numerical': 0.000894054537326777, 'mean_word_length': 3.833693304535637, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4477654', 'n_tokens_mistral': 658, 'n_tokens_neox': 655, 'n_words': 219}