Articles tagged in: Node.js



hapi — How to Fix “Unsupported Media Type”

The “unsupported media type“ error occurred while uploading a file to a hapi server. The file is an Excel sheet and at first, it seemed like the content type was the issue. But the problem was the multipart upload which comes with a straightforward fix! {{outline}} Fixing “Unsupported Media Type” …

Continue Reading

GitHub Actions — Run on Pull Request

GitHub Actions have different triggers. You can run an action when pushing code to a repository, or when creating a new tag. When building open source packages, you may receive pull requests from users. Typically, you want to run your test suite against the changed code in the pull request. …

Continue Reading

Sort an Array of Integers in JavaScript and Node.js

Sorting data is a common task in programming. JavaScript provides a .sort(comparator) method on arrays allowing you to sort data with custom comparator. A comparator represents a compare function determining which element comes before the other. When sorting integers, a custom compare function comes handy because you can ensure …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.