Eloquentcode.com

REST API Design: Health Check Endpoint – eloquent code

WebA health-check or simply health endpoint can be very useful for testing and inspecting a running API, especially when rather implementation-specific information is …

Actived: 2 days ago

URL: https://eloquentcode.com/rest-api-design-health-check-endpoint

GraphQL Mesh Gateway Health Check Endpoint – eloquent code

WebWhen running the GraphQL Mesh server in a cloud environment in a container, perhaps using a platform like Kubernetes or Elastic Container Service on …

Category:  Health Go Health

October 2020 – eloquent code

WebA health-check or simply health endpoint can be very useful for testing and inspecting a running API, especially when rather implementation-specific information is used. It can …

Category:  Health Go Health

Create an HTML Test Coverage Report in Go – eloquent code

WebGenerate the visual coverage HTML files using: If you are using a Makefile on macOS we can add a command to run all of this together in order and open the page …

Category:  Health Go Health

Istanbul Ignore Syntax for Jest Code Coverage

WebIstanbul is the tool Jest uses to calculate test coverage. Sometimes we need to exclude some code from the coverage calculations. This is done with special …

Category:  Health Go Health

REST API Design: Maintaining an API Style Guide

WebA common approach also makes work across teams much smoother. An API style guide helps another dimension of this: API design consistency. For example, …

Category:  Health Go Health

REST API Design for Usability: Human-Readable Date Fields

WebAn API with great Developer Experience (DX) returns responses as immediately understandable as possible, and one common and easily achieved usability …

Category:  Health Go Health

Batch Resources Endpoint in REST API Design – eloquent code

WebSometimes in a REST API we want a single endpoint to be able to return multiple types of resources at once. Some names for this are a batch resources endpoint …

Category:  Health Go Health

Perform Speech Recognition in the Terminal with Whisper

WebOpenAI Whisper is a state-of-the-art speech recognition model that we can run from the command line.. This post assumes macOS with Python >= 3.7 installed.. …

Category:  Health Go Health

Access the Clipboard Through the Terminal in macOS

WebWe can send its contents to the clipboard by piping the data to pbcopy: $ cat file.json | pbcopy. Now, we simply press Command+v in a GUI app like Postman or …

Category:  Health Go Health

Jest: Expect a String Result to be Numeric – eloquent code

WebJavaScript unit tests in Jest may need to assert that a string result from a function is numeric, i.e. a string containing only numbers. Since we do not have a …

Category:  Health Go Health

Expect an Array to Contain an Object in Jest – eloquent code

Webexpect(arr). toContain ( // This will fail. { b: 2 } }) This will actually result in a failure. The matcher is comparing two different instances of the object {b: 2} and …

Category:  Health Go Health

Create a MySQL Docker Container with a Predefined Database

WebBuild the container in the directory with Dockerfile, tagging it with the name my_db (for example): docker build -t my_db . Run the container on port 3306: docker run …

Category:  Health Go Health

Generate a Diagram for a Keras Model on macOS – eloquent code

WebWe can output a visualization of a Keras deep learning model using the plot_model utility function.. First the dependencies need to be installed: $ pip install pydot …

Category:  Health Go Health

Read Header Values from a File in a cURL Request

WebIt can be cumbersome to type many different header names and values when composing a cURL command. We can read all of the headers sent with a request from a …

Category:  Health Go Health

Add a Pre-Commit Git Hook to a Node.js Repo with Husky

WebWe can easily add a pre-commit hook to a NodeJS repository using the Husky package. The example below shows how this works. First install Husky: $ npm …

Category:  Health Go Health

Mount a Host Machine Directory Inside a Multipass VM

WebTo be able to access files on a host machine from a Multipass Ubuntu VM, we can mount the local directory into the virtual machine. Assuming we have a host …

Category:  Health Go Health

Prevent Committing Secrets with a Pre-Commit Hook

WebNote that the scanner needs the file to be known to git; the git add command made this true. We can add the detect-secrets-launcher command to a git pre-commit …

Category:  Health Go Health

Install golang-migrate Inside a Docker Container – eloquent code

WebTo run database migrations using golang-migrate in a pipeline for a Go application, we need the binary migrate command available in the container.. Installing …

Category:  Health Go Health

Array Reduce Syntax in JavaScript – eloquent code

WebGraphQL Mesh Gateway Health Check Endpoint; Set a POST Request to be a Query in GraphQL Mesh using OpenAPI; Run an Ubuntu VM on an Apple M1 Mac; …

Category:  Health Go Health

Use git grep to search for strings across all branches

WebTherefore, it is useful to search through all branches of a repository to be certain where some string of interest is generated, a file is written, etc. To search through …

Category:  Health Go Health

Dynamically Generate Variable Names in Perl – eloquent code

WebNOTE: this is not recommended, but it is a powerful feature which can be useful.. We can generate dynamic variable names in Perl using Symbolic References.To …

Category:  Health Go Health