import child_process from 'child_process';
import Config from '../lib/config';

export default function() {
  let config = Config.create();

  child_process.spawn('http-server', [
    config.get('path.destination'),
    '-p ' + config.get('server.port'),
    '-d',
    '-c-1'
  ], {
    stdio: 'inherit'
  });
}

import child_process from 'child_process';
import path from 'path';
import Config from '../lib/config';

export default function() {
  const config = Config.create();

  const httpServerPath = path.resolve(
    __dirname,
    '../node_modules/.bin/http-server'
  );

  child_process.spawn(httpServerPath, [
    config.get('path.destination'),
    '-p ' + config.get('server.port'),
    '-d',
    '-c-1'
  ], {
    stdio: 'inherit'
  });
}

use local copy of http-server when spinning up yarn serve