Blog

Page 741 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Node.js quick file server (static files over HTTP)
httpnode.js

Node.js quick file server (static files over HTTP)

Published on September 2, 2023

# Node.js File Server - Serving Static Files Over HTTP šŸ–„ļøšŸ“‚ Are you looking for a quick and easy way to expose a folder's content as a file server over HTTP using Node.js? It can be a handy tool when you want to share files with others or access them rem

Cover Image for How do I resolve "Cannot find module" error using Node.js?
node.js

How do I resolve "Cannot find module" error using Node.js?

Published on September 2, 2023

# Resolving "Cannot find module" error using Node.js So, you pulled down a module from GitHub, built it, and tried to add it to an existing project. But, when you run your app, Node.js throws a "Cannot find module" error. šŸ¤” Don't worry! I've got you cov

Cover Image for Using Node.JS, how do I read a JSON file into (server) memory?
javascriptjsonnode.js

Using Node.JS, how do I read a JSON file into (server) memory?

Published on September 2, 2023

# šŸ¤” How to Read a JSON File into Memory Using Node.js? šŸ“‚ Are you experimenting with Node.js and want to read a JSON object into memory quickly? Look no further! In this blog post, we'll explore different methods to accomplish this task and provide easy

Cover Image for module.exports vs exports in Node.js
javascriptnode.js

module.exports vs exports in Node.js

Published on September 2, 2023

# Understanding module.exports vs exports in Node.js šŸ“¦šŸ¤” When working with Node.js modules, you may come across the terms `module.exports` and `exports`. šŸ¤·ā€ā™‚ļø While they both serve a similar purpose of exporting values from a module, there are some key

Cover Image for Call async/await functions in parallel
asynchronousecmascript-6javascriptnode.js

Call async/await functions in parallel

Published on September 2, 2023

# Calling async/await Functions in Parallel: A Complete Guide šŸ¤” Have you ever wondered how to call async/await functions in parallel instead of one after the other? If so, you're in the right place! In this guide, we'll explore common issues, provide eas

Cover Image for How do I convert an existing callback API to promises?
javascriptnode.jspromise

How do I convert an existing callback API to promises?

Published on September 2, 2023

# Converting Callback API to Promises: A Comprehensive Guide šŸ”„āœØ Are you tired of working with callback APIs and longing for the simplicity and elegance of promises? Fear not! In this guide, we will explore how to convert an existing callback API to promi

Cover Image for How do you prevent install of "devDependencies" NPM modules for Node.js (package.json)?
node.js

How do you prevent install of "devDependencies" NPM modules for Node.js (package.json)?

Published on September 2, 2023

# How to Prevent Installation of "devDependencies" NPM Modules for Node.js Are you tired of having both your `dependencies` and `devDependencies` installed every time you run the `npm install` command? šŸ¤” Don't worry, you're not alone! This common issue c

Cover Image for How can I print a circular structure in a JSON-like format?
javascriptjsonnode.js

How can I print a circular structure in a JSON-like format?

Published on September 2, 2023

## How to Print a Circular Structure in a JSON-like Format Are you trying to convert a large object into JSON format but encountering circular references along the way? 😫 Don't worry, we've got you covered! In this guide, we'll walk you through common is

Cover Image for What is "export default" in JavaScript?
ecmascript-6javascriptnode.js

What is "export default" in JavaScript?

Published on September 2, 2023

šŸ“ **What is "export default" in JavaScript? A Beginner-Friendly Guide** šŸ–„ļø Are you a JavaScript developer stumbling upon the mysterious phrase "export default" and wondering what it actually means? šŸ¤” Don't worry, you're not alone! In this guide, we'll

Cover Image for How to fix "ReferenceError: primordials is not defined" in Node.js
node.js

How to fix "ReferenceError: primordials is not defined" in Node.js

Published on September 2, 2023

## šŸš€ How to Fix "ReferenceError: primordials is not defined" in Node.js šŸš€ So, you're trying to run `gulp sass-watch` in your command prompt after installing Node.js modules using `npm install`. But, BOOM! You encountered the dreaded `ReferenceError: pri