How get the const and put in mysql database

128 views Asked by At

I'm using FingerprintJS to get the ID of a user, and right now, I'm only able to output the ID in the console. How can I add the result to a table?

Here's my code:

// Initialize the agent at application startup.
const fpPromise = import('https://fpcdn.io/v3/Xhk2W83F3F8jStNRz99k')
  .then(FingerprintJS => FingerprintJS.load())
  
// Get the visitor identifier when you need it.
fpPromise
  .then(fp => fp.get())
  .then( Result  => {
    // This is the visitor identifier:
    const visitorId =  Result.visitorId
    console.log(visitorId)
  })
0

There are 0 answers