Nginx Container for React with Docker Compose

Nginx Container for React with Docker Compose

Tiempo de lectura: 2 minutos Today I’m going to share a container setup for React based on Nginx. To do this, we are going to create this docker-compose.yml version: ‘3.1’ services: nginx_frailstop: build: . container_name: nginx_frailstop restart: unless-stopped ports: – “80:80” – “443:443” volumes: – ./dist:/usr/share/nginx/html – ./config/nginx/cache/:/var/cache/nginx/ – ./config/nginx/sites/:/etc/nginx/sites-enabled/ – ./config/nginx/config/nginx.conf:/etc/nginx/nginx.conf Now we are going to create our Dockerfile … Read more

Fixing route error when refreshing with F5 in React (react-router-dom) using nginx

Fixing route error when refreshing with F5 in React (react-router-dom) using nginx

Tiempo de lectura: < 1 minuto Today I share a solution to properly configure the nginx.conf file to make it compatible with react-router-dom route management. To solve the error, we need to add the line try_files $uri $uri/ /index.html; inside the nginx.conf file http{ … server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri … Read more

Generate development build with React Vite

Generate development build with React Vite

Tiempo de lectura: < 1 minuto Today we are going to learn how we can generate a development build with React Vite. This will generate the dist folder with development configuration. To do this, we need to go to the package.json file and add this command inside «scripts»: { “scripts”: { … “build-dev”: “tsc && vite build –mode development”, … } … Read more

Install Docker and Docker Compose on Debian, quickly.

Install Docker and Docker Compose on Debian, quickly.

Tiempo de lectura: < 1 minuto Today we’re going to learn how we can install Docker and Docker Compose on Debian very quickly. First, we add the Debian repository keys. # Add Docker’s official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # … Read more

Software Engineering: Model View ViewModel (MVVM)

Software Engineering: Model View ViewModel (MVVM)

Tiempo de lectura: 3 minutos The term “Model-View-ViewModel” (MVVM) is a software architecture pattern commonly used in the development of software applications, especially in user interface applications such as web and mobile apps. MVVM is a variant of the Model-View-Controller (MVC) pattern and focuses on separating the presentation logic from the business logic of an application. In MVVM, the three … Read more

Software Engineering: Model View Controller

Software Engineering: Model View Controller

Tiempo de lectura: 4 minutos The Model-View-Controller (MVC) is a software architecture pattern commonly used in the development of software applications, especially in web and desktop applications. This pattern is based on the principle of separation of concerns, which means dividing an application into three main components: Model, View, and Controller, each with specific responsibilities. Model: The Model represents the … Read more

Software Engineering: Object-Oriented Software Architecture

Software Engineering: Object-Oriented Software Architecture

Tiempo de lectura: 2 minutos Object-oriented software architecture focuses on designing and organizing software systems using principles and concepts of object-oriented programming. Unlike traditional architecture based on components or layers, object-oriented architecture is based on the idea of building systems as a collection of interconnected objects that collaborate to achieve the system’s goals. Below are some key concepts related to … Read more

Software Engineering: Test-Driven Development (TDD)

Software Engineering: Test-Driven Development (TDD)

Tiempo de lectura: 2 minutos Test-Driven Development (TDD) is a software development practice that focuses on writing automated tests before writing production code. The TDD development cycle follows three steps: writing a test, making it fail, and then writing the minimum code necessary for the test to pass. Below are the benefits and best practices associated with TDD: Writing Automated … Read more

Object-Oriented Programming: SOLID Design Principles

Object-Oriented Programming: SOLID Design Principles

Tiempo de lectura: 2 minutos The SOLID principles are a set of five software design principles that promote the creation of clean, maintainable, and scalable code. These principles were introduced by Robert C. Martin in his book “Agile Software Development, Principles, Patterns, and Practices” and are fundamental to object-oriented software engineering: Single Responsibility Principle (SRP): This principle states that a … Read more

Software Engineering: Fundamentals of Object-Oriented Programming (OOP)

Software Engineering: Fundamentals of Object-Oriented Programming (OOP)

Tiempo de lectura: 2 minutos Object-Oriented Software Engineering is an approach to software development based on the concept of objects, which are entities that represent data and behaviors. This tutorial will guide you through the fundamentals of object-oriented software engineering and how to apply them in your software development projects. Fundamentals of Object-Oriented Programming (OOP) Object-Oriented Programming (OOP) is a … Read more