import { http } from './server' ; import open from 'open' ; let port = 15000 ; http . on ( 'error' , function ( e ) { if ( e . code === 'EADDRINUSE' ) { port ++ ; http . listen ( port ) ; } } ) ; const server = http . on ( 'listening' , function ( ) { console . log ( `Jagtester running on http://localhost:${ port }` ) ; open ( `http://localhost:${ port }` ) . catch ( ( err ) => console . log ( err ) ) ; } ) ; http . listen ( port ) ; export default server ;