index.js
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
}
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
}
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 }
Generate setup token
Generate setup token