Tag: node.js
-
Node.js: Simple fetch() timeout
This code snippet tells `fetch()` to abort the request when it takes longer than the specified amount of time. It is only one line!
-
Before exit scripts in Node.js
Ever wonder how to do something just before a Node.js process ends? Safely close connections, clean up caches, or log your app’s status somewhere? With this script you can do it.