DEV Community

Discussion on: How to Initialize Multilayer Node.js RESTful API with JWT Auth and PostgreSQL in 3 Steps

Collapse
 
ionutmilica profile image
Ionut Milica

Good job. You may want to use the async versions of compareSync and hashSync as you may block the event loop. See: npmjs.com/package/bcrypt#why-is-as...

Collapse
 
vitaliikulyk profile image
VitaliiKulyk

Hello, thank you for a great tip! Totally agree with you, that using async methods is much better.
I knew about this but for some reason left it as it was.