const axios = require('axios'); const newClient = ({ playerName, challengerURL }) => { const start = () => axios({ method: 'POST', url: `${challengerURL}/api/register`, headers: { 'Content-Type': 'application/json;charset=utf-8' }, data: playerName, }) .then(({ data }) => data); return { start, }; }; module.exports = { newClient, };