const LC = require('./src/client'); const playerName = process.env.PLAYER_NAME || 'A shy user'; client = LC.newClient({ playerName, challengerURL: process.env.CHALLENGER_URL, }); client.start() .then(token => console.log(`${playerName} has registered with token ${token}`) || token) .then(client.nextChallenge) .then(challenge => console.log(`Next challenge: ${challenge}`) || challenge) .then(client.solve) .then(solution => console.log(`… solved into: ${solution}`));