{"size": 1290, "ext": "js", "max_stars_repo_path": "lib/build/tasks/connect.js", "max_stars_repo_name": "ozaytsev86/cartodb", "max_stars_repo_stars_event_min_datetime": "2015-01-04T01:00:53.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T19:23:54.000Z", "max_issues_repo_path": "lib/build/tasks/connect.js", "max_issues_repo_name": "ozaytsev86/cartodb", "max_issues_repo_issues_event_min_datetime": "2015-01-02T08:04:15.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-24T15:44:28.000Z", "max_forks_repo_path": "lib/build/tasks/connect.js", "max_forks_repo_name": "ozaytsev86/cartodb", "max_forks_repo_forks_event_min_datetime": "2015-01-06T21:57:15.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-26T13:34:39.000Z"}
{"max_stars_count": 2135, "max_issues_count": 13253, "max_forks_count": 655, "avg_line_length": 23.4545454545, "max_line_length": 89, "alphanum_fraction": 0.5170542636}
const DEFAULT_CONFIG = {
  livereload: false,
  hostname: '0.0.0.0', // to be able to access the server not only from localhost
  base: {
    path: '.'
  }
};

function generateConfig (cfg) {
  return Object.assign({}, DEFAULT_CONFIG, cfg);
}

module.exports = {
  task: function () {
    return {
      server: {
        options: {
          port: 8089,
          livereload: false,
          open: 'http://localhost:8089/editor_specs.html',
          hostname: '0.0.0.0', // to be able to access the server not only from localhost
          base: {
            path: '.'
          }
        }
      },
      // For Headless chrome tests (grunt test)
      test: {
        options: {
          port: 8088,
          livereload: false,
          hostname: '0.0.0.0', // to be able to access the server not only from localhost
          base: {
            path: '.'
          }
        }
      },
      // Watching the specs during development
      specs_dashboard: {
        options: generateConfig({
          port: 8090,
          open: 'http://localhost:8090/_SpecRunner_dashboard.html'
        })
      },

      specs_builder: {
        options: generateConfig({
          port: 8088,
          open: 'http://localhost:8088/_SpecRunner_builder.html'
        })
      }
    };
  }
};
