import path from 'path';
import UWaveServer from './server';

// API
import V1 from '../../u-wave-api-v1/src/api';

// config
import serverConfig from './config/uwave';
serverConfig.cert = path.normalize(path.join(__dirname, '../test.cert'));

const server = new UWaveServer(serverConfig);
const v1 = new V1(serverConfig);

server.on('stopped', () => process.exit(0));
server.on('started', uwave => {
  v1.registerModels(uwave);
  v1.registerWSServer(uwave);
});

server.registerAPI('/v1', v1.getRouter());
server.start();

@@ -82,14 +82,8 @@
 om '
-../../
 u-wa
@@ -95,16 +95,8 @@
 i-v1
-/src/api
 ';%0A%0A

use default u-wave-api-v1 export