only launch websocket server if previewing