Reputation: 403
I am pretty new to node js.I am confused that what is the efficient way and without affecting performance to generate unique id with mysql/nodejs.I don't want last insert id.I want unique id like facebook and google does...
Upvotes: 0
Views: 2732
Reputation: 4678
var uuid = require("uuid");
console.log(uuid.v4()); // something like 3cbfe5fd-ce71-47c1-a7d0-af35d6628f64
Upvotes: 2