await promise nodejs without timer code example Example: nodejs promise sleep await new Promise(r => setTimeout(r, 2000));