#node

Found 29 articles tagged with #node

How to include query parameters in GET request with Axios

Query parameters are appended after the URL path, starting with a `?`. They are used to filter, sort, or modify the resources.

What are npm peer dependencies?

Peer dependencies are a way to declare dependencies that a package expects to be present at a higher level in the dependency tree.

Jan 20, 2024#npm#node

How to send an authorization header with Axios

Axios has some useful features, such as setting default headers, intercepting requests and responses, canceling requests, and transforming request and response data.

Dec 05, 2023#axios#node#http

How to manage environment variables in Node.js

Environment variables are named values that can be used to configure applications and processes, allowing for easy customization and portability.

Dec 01, 2023#node#env

How to run shell commands in Node.js

Running shell commands allows you to script and automate various processes, interact with system-level commands or utilities that are available in the shell.

Nov 30, 2023#node#scripts

How to create a sleep or delay in Node.js

A sleep or delay function is a programming feature that allows you to pause the execution of a program or a specific part of a program for a specified amount of time.

How to encode and decode base64 in JavaScript

Base64 works by dividing the input data into groups of three bytes (24 bits) and then converting each group into four characters from the 64-character alphabet.

Oct 17, 2023#javascript#node

How to delete a file in Node.js

You can use the fs module, which provides methods for working with files and directories: Using fs.unlink() to delete asynchronously, or fs.unlinkSync() to delete synchronously.

Sep 14, 2023#node#javascript

How to get current folder in Node.js

Current folder refers to 2 possible locations: current folder in project using __dirname variable, and current working directory using process.cwd or dot-slash notation.

Jul 20, 2023#node#how-to

How to promisify a function in Node.js

Promisifying is converting a callback-based function into a function that returns a promise, which allows you to use promise chaining or convenient async/await syntax.

Jun 30, 2023#node#how-to