We can deploy a Rust application based on the Actix-Web framework in a Docker container when we are coding in Windows. In this post, we compile Rust codes on Windows but deploy the application to an Ubuntu 18.04 Docker image.
Actix-Web In Ubuntu Docker Container Not Accessible
An Actix-Web application in an Ubuntu Docker container may not be accessible from the host operating system. For non-production codes and configuration, it may be due to two factors. Actix-Web Is Not Accessible in Docker Container Due to Rust Codes
Ways to Create Temporary Files In Rust
Creating temporary files in Rust is sometimes essential when we need to use the files once or cache data for a short time. We then let the operating system delete the files at a later time automatically or by its
Rust dev-dependencies and dependencies
In any codebase, some codes are not for the end-users. Meaning, they do not become part of the final application – be it for QA or production environment. They are codes for testing (e.g., unit tests) and building the app
Java String – Convert or Parse to Primitive int
There are several ways to convert or parse Java Strings to int values. In Java, Integer values come in various types. We have the primitives long, int, short, and byte; and, we have equivalent Wrapper classes Long, Integer, Short and
Swap Between Vec Elements in Rust
Swapping between Vec elements in Rust can be a little tricky. The get method returns Option<&T>, and the lone swap method accepts an index and a value – not a reference. There is an alternative, though. But it uses unsafe codes.
Compare Dates In Java That Are Of Different Date Types
As of Java 8, there are at least three different types of dates available for developers. As a result, the usage of these various types of dates sometimes causes problems, especially when we compare dates in Java. We perform dates
Show Rust Dependencies Using Cargo
It is now possible to show Rust dependencies using Cargo. Before Rust 1.44.0, there was not a built-in method to display a dependency graph. There was a plugin, though, called cargo-tree. Show Rust Dependencies Using Cargo-tree With the cargo-tree plugin,
Working with Actix-Web HTTP Requests
When working with Actix-Web, we sometimes need to access incoming HTTP requests to inspect for some values. In that case, we need to use the HttpRequest struct either in request handlers and middlewares. Cargo.toml We will use the following dependencies
IntelliJ IDEA And Ballerina Plugin Configuration
This post shows how to install Ballerina and OpenJDK 8 using ZIP distributions, add on its IntelliJ plugin, and create a Ballerina project in Intellij IDEA. We are going to use OpenJDK 8 because Ballerina 1.2.6 only works on that