Skip to content

Tag: node.js

Is there any way to get milliseconds in CronJobs?

I want to render JavaScript function in every 500ms using node Cronjobs. But I could find function for every 1 second as below. Is there anyway to run function on every 500ms using node Cronjob? Answer Setting a cron job to execute that frequently is not possible, and for good reason – a task executing …

Why hashing the reset password token?

I have this forgot password handler in my Express app. I send an email with a crypto.randomBytes(20).toString(“hex”) token, that I use later to verify the request. It is working perfectly. However, I have seen that people are hashing this token before sending it and storing in the data base, and I…