<commit_before># Parse YAML to get config
parse = require './libs/yaml.js'
fs = require 'fs'
path = require 'path'
get = require './libs/get.js'
checks = require './libs/checks.js'
parse = require './libs/parse.js'
# Read instances

start = (args, dir) ->
  # Check instances
  checks.instances(dir)
  # Parse YAML
  parsed = parse.parse(dir+'/'+args+'/.web.yml')
  console.log 'Starting Web-app '+parsed.name
  console.log 'Language: '+parsed.language
  if parsed.nodejs != undefined && process.env.WEB_DOCKER != true
    console.log 'Nodejs version '+ parsed.nodejs+' is required. \nPlease consider using Docker'
  if parsed.ruby != undefined && process.env.WEB_DOCKER != true
    console.log 'Ruby version '+ parsed.ruby+' is required. \nPlease consider using Docker'
  if parsed.python != undefined && process.env.WEB_DOCKER != true
    console.log 'Python version '+ parsed.python+' is required. \nPlease consider using Docker'

start('test', 'instances')<commit_msg>Add start fun = issue<commit_after># Parse YAML to get config
parse = require './libs/yaml.js'
fs = require 'fs'
path = require 'path'
get = require './libs/get.js'
checks = require './libs/checks.js'
parse = require './libs/parse.js'
exec = require 'child_process'
# Read instances

start = (args, dir) ->
  # Check instances
  checks.instances(dir)
  # Parse YAML
  parsed = parse.parse(dir+'/'+args+'/.web.yml')
  console.log 'Starting Web-app '+parsed.name
  console.log 'Language: '+parsed.language
  if parsed.nodejs != undefined && process.env.WEB_DOCKER != true
    console.log 'Nodejs version '+ parsed.nodejs+' is required. \nPlease consider using Docker'
  if parsed.ruby != undefined && process.env.WEB_DOCKER != true
    console.log 'Ruby version '+ parsed.ruby+' is required. \nPlease consider using Docker'
  if parsed.python != undefined && process.env.WEB_DOCKER != true
    console.log 'Python version '+ parsed.python+' is required. \nPlease consider using Docker'
  log = exec.spawn(parsed.start)
  log.stdout.on('data', (data) ->
    return 'h'
    console.log data
  )

  log.stderr.on('data', (data) ->
    return 'h'
    console.log data
    # body...
  )

  log.on
  return 'Done'
  # start

start('test', 'instances')
{'fraction_non_alphanumeric': 0.14762979683972913, 'fraction_numerical': 0.0, 'mean_word_length': 3.665263157894737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4907259', 'n_tokens_mistral': 747, 'n_tokens_neox': 713, 'n_words': 204}