Tagged “node”
-
TIL what is npm Script javascript node
Despite their high usage they are not particularly well optimized and add about 400ms of overhead. In this article we were able to bring that down to ~22ms.
-
TIL keywords in package.json node keywords
Today I learned what keywords are in a package.json file! It's a collection of keywords about a module. Keywords can help identify a package, related modules and software, and concepts.
-
TIL outputting objects in Node logging node
In your Node projects -- sometimes you just need to output the object. Stringify it.
-
TIL Libuv javascript node
Libuv also implements two extremely important features of Nodejs which are the event loop and the thread pool and in simple terms, the event loop is responsible for handling easy tasks like executing callbacks and network I/O while the thread pool deals with heavy work like file access or compression.
-
TIL node modules fs and os node streams os
with fs - you can access files, read files, make directories, chmod. With os - get stats, machine, version, hosts.
-
TIL Node Streams node streams promise
Imagine if you did some data-extensive fetch request getting a 1 gig file. 1 gig can take a while, and it's fetching it in memory.
-
TIL Websockets node communication
They offer a long lived, bidirectional communication channel between client and server. Once established, the channel is kept open, offering a very fast connection with low latency and overhead.
-
TIL Node.js Event Emitter node javascript
This is kinda like the addEventListener() for browser javascript.
-
TIL JS Cron and process.platform node javascript cron
Cron is a tool that allows you to execute something on a schedule. This is typically done using the cron syntax. process.platform tells you what platform the user is running. For this usecase, if it's win32, use robocopy. Else use rsync.
-
TIL about why Node was invented node history javascript
Node.js applications never buffer data, which dramatically reduces the processing time of uploading files, such as videos or audios. In other words, it simply outputs data in chunks, meaning that, for example, a user can watch videos without any interruption.
-
TIL Npx npm-check-updates node npm
Updating packages is frequent chore to do so you are always running the latest security patches.
-
TIL how to create randomware in nodejs security hacking node
As a developer, it's important to know the power we have in our hands, and how to execute and defend against it/avoid it. Running randomware attacks is illegal.
-
TIL the different Javascript Engines javascript node
There's dozens of JS engines. V8 ,Chakra, Spidermonkey, JavascriptCore Webkit, JerryScript...
-
TIL how Node/V8 works with imports/exports node advanced-js javascript
This is accurate only up to how JS works in Chrome-based browsers, and NodeJS, as Node uses V8 under the hood. But overall, it's referencing vs live binding
-
TIL how to quickly create a .nvmrc file node buildtools
all you need is 'node -v > .nvmrc' and let the magic happen
-
TIL how to append a date to a filename in Node node filename
My goal was to create a helper function that allows me to build a new file, and append a date to a filename for logging.
-
TIL getting all files with an extension in Node using Glob node file-directory
This helper function to get all the files that end in a specific extension in node
-
TIL unzipping a file in node using zlib node compression automation
Since my application needs to read whatever is inside that '.gz' file, I had to figure out a way to simplify that. That was done with zlib.
-
TIL end all node processing scripts javascript commandline terminal bash node stackoverflow
killall node - a sure fire way to kill a node.js server that won't stop running.
-
TIL of a console.log way to avoid [object object] javascript object node
you can use JSON.stringify to get a object.
-
TIL why NodeJS in reference to I/O javascript node definitions
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. tl;dr: bypasses JavaScript single-threaded event loop
-
TIL rimraf, a rm alternative node terminal
rm is platform specific (and certainly will not work on Windows) and rimraf deals with this for us.
-
TIL How to exit out of a node script node errorcodes
If you write a node script, you can terminate it by Ctrl+C, or forcing a quit within the script, or using the process.exit()
-
TIL about some key elements of NestJS javascript node framework
Controllers, Providers, and Modules OH MY!
See all tags.