Nane
Nane

Reputation: 403

What is the efficient way to generate unique id in mysql with node js?

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

Answers (1)

Daphoque
Daphoque

Reputation: 4678

var uuid = require("uuid");
console.log(uuid.v4()); // something like 3cbfe5fd-ce71-47c1-a7d0-af35d6628f64

Upvotes: 2

Related Questions