Skip to content

Code with Node.js

  • Developer Tools
  • Image Converter
  • Servers and APIs
  • Browser Automation
  • Frontend
  • Templating
  • Contact
Code with Node.js
  • Contact
  • Developer Tools
    • Base64 Encode / Decode Online
    • Convert SVG clip-path to 0-1 relative coordinates
    • Free Online Image Converter

Animated.loop in React Native doesn’t make the animation loop on web

Leave a Comment / Frontend

It took me a while of testing, but whatever I tried resulted in one animation loop when compiling a React Native component for the Web. Turns out, there’s one parameter that was causing it.

…

Animated.loop in React Native doesn’t make the animation loop on webRead More »

View summary of all Docker containers memory usage

Leave a Comment / Builds and Pipelines, Servers and APIs

You can get pretty much all resource usage information with docker stats, but what you will lack there is the summary.

…

View summary of all Docker containers memory usageRead More »

Error: Cannot find module ‘node:process’ after Rollup upgrade

Leave a Comment / Builds and Pipelines

As silly as it gets, the solution is to upgrade your NodeJS version.

…

Error: Cannot find module ‘node:process’ after Rollup upgradeRead More »

Beautify JSON object with built-in JSON.stringify()

Leave a Comment / Snippets

You don’t need to write a recursive loop to nice-format an object or an array. There is a JSON.stringify() that you can utilize.

…

Beautify JSON object with built-in JSON.stringify()Read More »

Simple load balancer with Docker, Nginx and Node.js

Leave a Comment / Builds and Pipelines, Servers and APIs

It is a common knowledge that Node.js is a single-threaded single-core process. It sounds like an issue, but it gives you full freedom over how many processes you can run and how many cores want to utilize.

…

Simple load balancer with Docker, Nginx and Node.jsRead More »

Block user based on IP address in Express or any other Node HTTP server

Leave a Comment / Servers and APIs

This is an easy task, but you will need to find a way to get the user’s IP address. And here’s how.

…

Block user based on IP address in Express or any other Node HTTP serverRead More »

Running Node.js with Docker

Leave a Comment / Builds and Pipelines

You don’t have to install Node and manage different Node versions on your system. Everything can be done with Docker, including packaging your Node.js app into a distributable Docker image.

…

Running Node.js with DockerRead More »

error TS2792: Cannot find module ‘moment’. Did you mean to set the ‘moduleResolution’ option to ‘node’, or to add aliases to the ‘paths’ option?

Leave a Comment / Frontend, Snippets

Got this error when trying to import moment into a TypeScript React (.tsx) module?

…

error TS2792: Cannot find module ‘moment’. Did you mean to set the ‘moduleResolution’ option to ‘node’, or to add aliases to the ‘paths’ option?Read More »

Detect user country by IP in Node.js

Leave a Comment / Data Processing, Servers and APIs

It shouldn’t be hard to detect a user’s country based on the IP address, right? Right… I really liked the simplicity of ip2location module: load the BIN file, get the location, and close the BIN file.

…

Detect user country by IP in Node.jsRead More »

Cannot augment module ‘console’ with value exports because it resolves to a non-module entity.

Leave a Comment / Builds and Pipelines, Snippets

This error message appears when typings are exposed globally, yet TypeScript tries to validate module typings and the names conflict.

…

Cannot augment module ‘console’ with value exports because it resolves to a non-module entity.Read More »

Posts navigation
1 2 … 4 Next Page →

About “Code with Node”

This is a personal blog and reference point of a Node.js developer.
I write and explain how different Node aspects work, as well as research popular and cool packages.

Quick Links

  • Home
  • Free Online Image Converter
  • Developer Tools
  • Snippets
  • Contact

Popular Posts

  • error TS2792: Cannot find module ‘moment’. Did you mean to set the ‘moduleResolution’ option to ‘node’, or to add aliases to the ‘paths’ option?
    Got this error when trying to import moment into a TypeScript React (.tsx) module? To fix the issue, you will need to adjust your tsconfig.json file and add "moduleResolution": "node" ...
  • Cannot augment module ‘console’ with value exports because it resolves to a non-module entity.
    This error message appears when typings are exposed globally, yet TypeScript tries to validate module typings and the names conflict. I got this with a Figma widget module @figma/plugin-typings, and ...
  • Building a Preact application into a standalone script with Rollup
    Rollup is a module bundler for JavaScript, made for speed and simplicity of setup. It also does tree-shaking (imports only the functionality you actually imported), supports JSX compilation and provides ...
  • How to create a simple contact form with Node.js?
    Project initialization. Let's start by creating an empty folder and initializing our package.json with npm init. We will also include express to set up our application, express-validator to validate the ...
  • Automatically serve .webp or .avif with Node.js based on browser request headers.
    Let's chew down another issue: we have a /public folder with images, and depending on the browser we want to serve a WEBP or AVIF to save bandwidth and decrease ...

Subscribe to “Code with Node”

Loading

Copyright © 2023 Code with Node.js