code: function generateSetupToken (tokenPath) {
    mkdirp.sync(path.dirname(tokenPath))
  
    var token = crypto.randomBytes(256).toString('hex')
    try {
      fs.writeFileSync(tokenPath, token, 'utf8')
    } catch (e) {
      throw new Error('Unable to save setup token to ' + tokenPath)
    }
    return token
  }
docs: Generate setup token