node

Running local LLM (Ollama) from API in node.

Running local LLM (Ollama) from API in node.

We all love AI, and since recent years the boom in Artificial Intelligence has changed the world and is taking it into a new era. For any use problem there is a use case of AI, being it asking Gemini about a cooking recipe, Chatgpt for assignments, Claude for programming, V0 for frontend design, devs and students are so much dependent on AI these days which leads to almost every new day a startup emerging featuring AI. This leads to aspiring developers like me question on how can I make something like this? The answer is in the picture above…
Read More
Chunk-Busters: Don’t cross the Streams!

Chunk-Busters: Don’t cross the Streams!

⚠️ If you have photosensitivity, you probably want to skip this.See the static image below, those lights will start blinking real fast! How does the internet work? Remember the title… we are talking about streams here. I could talk about protocols, packets, ordering, acks, and nacks… but we are talking about streams here, and as you probably guessed right (I believe in you =D) with streams… it’s either binary or strings. Yes, strings are zipped before being sent… but for what we usually care about in front and backend development… strings and binary. In the following examples, I’ll be using…
Read More
How to Create a RESTful API with Node.js: A Step-by-Step Guide

How to Create a RESTful API with Node.js: A Step-by-Step Guide

In today’s tech landscape, APIs (Application Programming Interfaces) are essential for building robust applications. RESTful APIs are a popular choice for web services due to their simplicity and scalability. In this tutorial, we’ll walk through the process of creating a RESTful API using Node.js, Express, and MongoDB. Table of Contents What is a RESTful API? Setting Up the Environment Creating Your Node.js Project Building the RESTful API Best Practices for API Design Documenting Your API Conclusion What is a RESTful API? REST (Representational State Transfer) is an architectural style for designing networked applications. A RESTful API allows clients to perform…
Read More
Understanding WeakRefs and FinalizationRegistry in JavaScript

Understanding WeakRefs and FinalizationRegistry in JavaScript

JavaScript has continuously evolved, and advanced features like WeakRef and FinalizationRegistry offer developers a granular level of control over memory management. These tools empower developers to create efficient applications while managing memory and resources in sophisticated ways. Let’s explore these constructs deeply, analyze their mechanics, and discuss their applications, limitations, and best practices. Memory Management in JavaScript: A Primer Before going into WeakRef and FinalizationRegistry, understanding JavaScript’s garbage collection mechanism is essential. The garbage collector automatically identifies and removes unused memory to optimize performance. However, this automated process has limitations, especially for scenarios requiring explicit or fine-grained memory management. Challenges…
Read More
Using Rapyd for Your Gig Economy Payment Gateway and Disbursement Platform

Using Rapyd for Your Gig Economy Payment Gateway and Disbursement Platform

By: Samuel Umoren Rapyd is a fintech platform that enables you to accept, send, and store funds globally. With Rapyd, you can seamlessly integrate local commerce and fintech services into your applications, creating functional and tailored local experiences anywhere in the world. One of Rapyd's essential offerings is the Disburse platform. Rapyd Disburse lets you pay contractors, workers, suppliers, or any business. In this guide, you'll learn how to use the Rapyd Disburse API to build a gig payment app for freelancers. The app will allow freelancers to add their profile and bank details and request payments on demand or…
Read More
Unleash ServBay’s Power! Managing Local Hosts File

Unleash ServBay’s Power! Managing Local Hosts File

In macOS, the hosts file is used to map specific domain names to designated IP addresses. This is very useful for developing, testing, and debugging web applications. ServBay provides a convenient interface to manage the local hosts file on macOS, making it easier to add, modify, pause, and delete records. This article will detail how to use ServBay to manage the local hosts file. Viewing the Current Local Hosts File The hosts file is located at the path /etc/hosts. With ServBay, you can easily view the contents of the current local hosts file. Viewing Steps Open the ServBay management interface.…
Read More
Solving the Node.js console.time is not a function error

Solving the Node.js console.time is not a function error

Written by Joseph Mawa✏️ The console.time is not a function error is one of the common errors you will encounter in JavaScript and Node. It is a TypeError and its error message usually takes the following forms: console.time is not a function console.time(...) is not a function The first error message is usually caused by accidentally modifying the built-in console object or reassigning the console.time property to a value that is not a function. One of the main causes of the second error is the way JavaScript internally handles Automatic Semicolon Insertion (ASI). Continue reading to learn more about the…
Read More
We reach 750+ Stars on our Repository!

We reach 750+ Stars on our Repository!

Hi everyone, I'm Antonio, CEO at Litlyx. Today, I want to share a huge milestone with you. Over the years of my career as a Software Developer, I’ve gained so much from the Open-Source community. It’s likely that, in your codebase, you have 10 or more dependencies on open-source libraries in each tech stack you use. Thanks to this thriving community worldwide, we, as individuals, can grow our coding knowledge immensely. The past five months have been a rollercoaster of emotions for me. But now, it’s time to give back and pay the debt I've accumulated over the years from…
Read More
Installing And Running NPM Packages Using The Terminal

Installing And Running NPM Packages Using The Terminal

When working on a JavaScript project, chances are you'll need to install and use npm (Node Package Manager) packages. npm is essential for managing libraries and tools that enhance your development process. If you're new to this, here's a step-by-step guide to installing and running npm packages using the terminal. PrerequisitesInstall Node.js: Ensure that the recent version of Node.js is installed on your machine, as npm comes bundled with it. You can check if it's installed by running: and If you don't have it installed, download it from https://nodejs.org/https://nodejs.org/ and follow the installation instructions. After confirming it is successfully installed,…
Read More
Building a Website with Node.js and Express.js

Building a Website with Node.js and Express.js

This article divides deep into building websites with Node.js and Express.js. Express.js is an essential framework for creating robust and scalable web applications on top of Node.js, and today's focus will be on routing, middleware, template engines, and cookie sessions. Concept Highlights: app.use(callback) app.use(path, callback) GET, POST, PUT, DELETE Express Middleware Call the Next Middleware in the Stack Using Express Router Cookie Session Management Middleware Template Variables EJS 1. app.use(callback) The app.use(callback) method in Express.js is used to mount middleware functions. This middleware will run for every request made to your application, regardless of the HTTP method or URL. e.g.)…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.