JavaScript, webdev

Building PowderCast: The Ultimate Open Source Weather App for Snowboarders 🏂

If you know me, you know I love two things: writing code that solves real problems, and shredding fresh powder.

For years, I’ve been frustrated with generic weather apps. You know the struggle – the app says “partly cloudy and 30°F” for the town near the resort, but when you get to the summit, it’s a whiteout with 50mph gusts and wind-hold on every lift.

The delta between “base village weather” and “summit weather” can be the difference between the best day of your season and a frostbitten disaster.

So, I did what any engineer would do:

I built my own solution: PowderCast.

Continue reading
Standard
life, Sport

Weather 4 Bike: From Forecasts to Ride Decisions

Why

Most weather apps just tell you the numbers—temperature, wind, UV, etc.—but as cyclists, we need to know what those numbers mean for the ride.

Weather 4 Bike bridges that gap: it translates raw weather forecasts into clear, activity-aware guidance for road, gravel, and MTB. With one glance, you know whether to head out, wait, or change routes.

Continue reading
Standard
JavaScript, webdev

EspressoLabs Coding Challenge: Build a Real-Time Chat App

At EspressoLabs, we’re always on the lookout for talented engineers who can move fast, think clearly, and build scalable systems. Our home assignment is designed to evaluate just that — and we keep it focused and time-boxed.

“Talk is cheap. Show me the code.”
– Linus Torvalds

Continue reading
Standard
cloud, webdev

How to Use ngrok and LocalTunnel: Expose Your Local APIs to the World

Intro

As developers, we often face the challenge of testing our local applications with external services, webhooks, or mobile devices. Whether you’re developing APIs that need to communicate with AWS/GCP/Azure services, testing webhook integrations, or simply want to demo your work from different devices, exposing your localhost to the internet becomes essential.

This guide will walk you through two popular solutions: ngrok and LocalTunnel, showing you how to securely expose your local development server to the world.

What Are Tunneling Services?

Tunneling services create a secure tunnel from a public endpoint to your local machine, allowing external services to reach your development server without complex network configuration or deployment.

Common Use Cases

  • Testing webhooks from third-party services (Stripe, GitHub, etc.) — You can connect your local code directly and debug it more efficiently.
  • Sharing your work-in-progress with clients or team members — Instead of pushing it to some remote server. Useful in all the cases, where you are still ‘not ready’.
  • Testing mobile applications that need to connect to your local API — A must have in almost all cases.
  • Integrating with AWS services that require publicly accessible endpoints
  • Cross-device testing and debugging
Continue reading
Standard
Business

Securing Your (NodeJS) Backend: A Comprehensive Guide to Preventing Common Attacks

Web security is a critical concern for any backend developer. If you’re building applications using Node.js and Express, it’s essential to safeguard your backend against common security threats such as SQL injections, cross-site scripting (XSS), cross-site request forgery (CSRF), and other vulnerabilities. This comprehensive guide explores these attacks in depth and demonstrates best practices to prevent them with practical coding examples.

Continue reading
Standard
Business

Speeding Up Node & ReactJS Build Times

Speeding up Node or React build times on an EC2 instance involves optimizing your build process, leveraging the instance’s resources efficiently, and potentially tweaking your environment. Below are practical steps to reduce build times:

Continue reading
Standard
Chrome, JavaScript, webdev

Optimize NodeJS Apps in Production on Ubuntu

Why PM2 is Essential for Applications in Production?

When deploying a Node.js application in a production environment, ensuring stability, efficiency, and reliability is crucial. This is where PM2, a powerful process manager for Node.js applications, becomes an invaluable tool. PM2 simplifies process management, enhances performance, and provides robust monitoring capabilities. In this post, we’ll explore why PM2 is essential for running Node.js applications in production.

To ensure a Node.js app keeps running smoothly in production on Linux/Ubuntu, there are many ways to achieve this, but here are some of the essential steps that will help you elevate your application’s performance to the ‘next level’:

  1. Regularly monitor system resource usage to prevent bottlenecks
  2. Implement error handling and logging to quickly diagnose and fix issues as they arise
  3. Utilize process managers like PM2 or Forever to automatically restart your application in case of failures
  4. Ensure that your dependencies are always updated and secure to avoid vulnerabilities
  5. A bonus step: consider employing load balancing and clustering techniques to enhance the app’s scalability and availability. Nginx is great here even if you have one instance.

1. Use a Process Manager (PM2)

PM2 is a popular process manager for Node.js applications that provides automatic restarts, logging, and monitoring.

Install PM2 globally:

npm install -g pm2

Start your application with PM2:

pm2 start app.js --name myNodeJSAppButInProd

Managing different configurations for development, testing, and production environments can be cumbersome. PM2 allows you to define environment-specific variables using an ecosystem file:

module.exports = {
  apps: [{
    name: "my-app",
    script: "app.js",
    env: {
      NODE_ENV: "development",
    },
    env_production: {
      NODE_ENV: "production",
    }
  }]
};

This ensures that your application loads the appropriate settings based on the environment, reducing configuration errors.

Ensure PM2 restarts on reboot:

pm2 startup
pm2 save

Continue reading
Standard
Chrome, JavaScript, webdev

Top Resources to Learn JavaScript and TypeScript Effectively

JavaScript is the backbone of modern web development. TypeScript (TS)—its statically typed super-set — has rapidly gained traction in professional environments.

Whether you’re an aspiring developer or a seasoned programmer, this guide will help you level up your skills. It will assist you in navigating the learning path for JS and TS.

We’ll share various resources and courses to suit different learning styles. We will finish with three exciting project ideas to put your knowledge into practice.

Getting Started with JavaScript

Before diving into TypeScript, it’s crucial to have a solid understanding of JavaScript fundamentals.

Here are some steps and resources to get you started:

Continue reading
Standard
Business, webdev

Modern Web Stack Mastery: A Developer’s Guide to TypeScript, Tailwind, Node, and Testing

What do you wish a new full-stack developer to do before their first day to ensure a smooth onboarding experience?

We’d like you to review and strengthen your knowledge in the following key areas. This guide includes recommended resources and specific focus points for each technology.

Continue reading
Standard
Business, cloud, JavaScript

OpenAI API – 101 Tutorial

OpenAI is a research organization focused on developing advanced artificial intelligence technology, and one way it achieves this is by making its technology available to developers through APIs. 

This blog post will explore what OpenAI API is and how to use it from Node.js – We will show a few examples you can take and combine with your current applications.
Other good examples to explore the API are at openai.com.

What is OpenAI API?

OpenAI API is a powerful tool allowing developers to access cutting-edge AI models that OpenAI researchers train. 

It’s (also) a mouthful, no?

These models can be used for various applications, including natural language processing, translation, image recognition, chatbots, etc.

The OpenAI API is designed to be easy to use, with a RESTful API that can be accessed using any programming language.
It also includes pre-built models that can be used out of the box and the ability to train custom models using your own data.

Continue reading
Standard