Found 29 articles tagged with #node

Top 6 end-to-end testing frameworks for web apps

End-to-end testing is essential for web development, as it can detect bugs and errors that may not be visible in unit or integration testing; Playwright, Cypress, Puppeteer, Selenium.

How to turn an image into a data URI string in Node.js

You can use data URI strings to include small files or binary data in your web pages without having to make separate HTTP requests for them.

May 13, 2023#node#how-to

How to check if file exists in Node.js

Whether you need to verify if a file exists before performing an operation or simply want to handle different scenarios based on file availability.

May 12, 2023#node#how-to

Sync, callback, and promise based APIs in Node.js

"async/await" syntax in newer versions of Node.js simplifies working with promises, making asynchronous code resemble synchronous code in terms of readability and flow control.

May 11, 2023#node#comparison

How to fix error "__dirname is not defined in ES module scope" in Node.js

If you have enabled ES modules in Node.js or using ES modules through a module bundler like Webpack, you'll no longer have access to many variables compared to CommonJS.

Cannot use import statement outside a module in Node.js

This error means that you are trying to use the import statement in a file that is treated as a CommonJS module by Node.js. There are a few ways to fix this error, depending on your preferences and project setup.

How to download an image from URL in Node.js

Downloading an image from a URL involves sending a request to the server that hosts the image, receiving the response containing the binary data of the file, and then writing that data to a file.

Mar 16, 2023#node#snippets

Mastering NodeJS

Node has a unique advantage because millions of frontend developers that write JavaScript for the browser are now able to write the server-side code.

Top 12 libraries to build CLI tools in Node.js

CLIs are often the core tools for automating tasks. If you find yourself doing the same things over and over again, chances are you can automate those steps with a CLI tool to save time.

Sep 06, 2021#node#libs#lists

Node Database Drivers

Node.js clients to connect to popular databases like MySQL, MongoDB, Redis, PostgreSQL.

Sep 06, 2021#node#libs#lists