Articles tagged in: Node.js

Node.js — Determine the Current Operating System

In some situations, you may want to detect the underlying operating system of your application. This may happen if you’re using a feature switch or limited feature support on a given platform. For example, you may allow special characters on Unix-based systems and not on Windows. This tutorial shows …

Continue Reading

Node.js — Delete a File From Disk

Node.js provides the node:fs core module allowing you to interact with the local file system. You can create, read, update, or delete files on your computer’s hard disk. This tutorial shows you how to delete a file from your local disk. {{outline}} Delete a File From Local …

Continue Reading

Node.js — Convert a String to Buffer

When working with Node.js’ crypto module you sometimes need to provide Buffer instances as an argument. For example, the timingSafeEqual function accepts two buffer arguments for comparison. Sometimes your raw values are strings and you need to convert them before using them in your application code. This tutorial shows …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.