Marcus

Marcus is a fullstack JS developer. He’s passionate about the hapi framework for Node.js and loves to build web apps and APIs. Creator of Futureflix and the “learn hapi” learning path.


Git Prune Remote Branches That No Longer Exist

In git, you’re working with branches. A branch describes a parallel state to the main branch. You can change the code in your branch and test it without affecting the stable main branch. In your development team, you’ll review and work on different features which probably have their …

Continue Reading

JavaScript — How to JSON Stringify Errors

You can create a JSON string from anything in JavaScript using the JSON.stringify(anything) method. However, the resulting JSON string may not contain the expected values. For example, if you’re JSON serializing a JavaScript error, you’ll notice that its JSON string doesn’t contain any properties. JavaScript …

Continue Reading

Node.js — What is `Fs.realpath`?

The Fs.realpath method in Node.js resolves the actual file system location of a given path. For example, you’re typically creating a symlink for nginx configuration files from the directory containing all available files to the directory having the enabled files. You can use the Node.js file …

Continue Reading

Node.js — Handling `fs.Stats` Constructor is Deprecated

You may notice a deprecation warning in your terminal that the fs.Stats constructor is deprecated. Node.js deprecated the public fs.Stats constructor in version 22.0.0: (node:17560) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated. (Use `node --trace-deprecation ...` to show where the warning was created) This tutorial …

Continue Reading

Bun — Detect the Version at Runtime

Sometimes you need to detect the version running your code at runtime. You may need this to ensure that your code runs with a required version of Bun. This tutorial shows you how to detect the Bun version, that runs your code, at runtime. {{outline}} Determine the Bun Version Running …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.