<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Weasely</title>
    <description>The latest articles on Forem by Weasely (@sr-26).</description>
    <link>https://forem.com/sr-26</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1168192%2F26b2648e-bde8-43f3-9818-2e70829bd784.png</url>
      <title>Forem: Weasely</title>
      <link>https://forem.com/sr-26</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sr-26"/>
    <language>en</language>
    <item>
      <title>Unleashing Tiny-Link: A Swift Node.js Module for URL Shortening with Redis</title>
      <dc:creator>Weasely</dc:creator>
      <pubDate>Mon, 13 Nov 2023 17:33:13 +0000</pubDate>
      <link>https://forem.com/sr-26/unleashing-tiny-link-a-swift-nodejs-module-for-url-shortening-with-redis-4cg7</link>
      <guid>https://forem.com/sr-26/unleashing-tiny-link-a-swift-nodejs-module-for-url-shortening-with-redis-4cg7</guid>
      <description>&lt;p&gt;In the world of URL shortening, simplicity meets efficiency with &lt;a href="https://www.npmjs.com/package/tiny-link"&gt;Tiny-Link&lt;/a&gt;, a lightweight Node.js module designed for seamless URL shortening and management. Inspired by the need for a straightforward and high-performance solution, Tiny-Link leverages the power of Redis, making it a top-notch choice for developers who prioritize speed and ease of use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Tiny-Link?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Effortless URL Shortening&lt;/strong&gt;:&lt;br&gt;
Tiny-Link simplifies the process of shortening URLs with just a few lines of code. Say goodbye to complex setups and welcome a hassle-free experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inspired by Simplicity&lt;/strong&gt;:&lt;br&gt;
The Tiny-Link philosophy revolves around simplicity. The module is crafted to be easy to use, understand, and integrate into your Node.js projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Redis Integration&lt;/strong&gt;:&lt;br&gt;
Redis, the renowned in-memory data store, powers Tiny-Link's storage backend. This ensures lightning-fast read and write operations, making Tiny-Link ideal for scenarios where speed is paramount.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficient TTL Management&lt;/strong&gt;:&lt;br&gt;
Tiny-Link provides efficient Time-To-Live (TTL) management for your shortened URLs. Set expiration times effortlessly, and Tiny-Link takes care of the rest.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User Authentication Links&lt;/strong&gt;:
Simplify the generation of temporary authentication links. With Tiny-Link, create short-lived URLs for user authentication, enhancing security and usability.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;authLink&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tinyLink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shortenUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://your-auth-service.com/user/verify?token=abc123&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3600&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Expires in 1 hour&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;authLink&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Example Output: "9aJdbC3eR_-pUz2vLIxq7"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Social Media Sharing&lt;/strong&gt;:
Craft concise and shareable links for social media posts. Tiny-Link excels in creating short and memorable URLs, optimizing the user experience for your audience.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;promoLink&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tinyLink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shortenUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://your-marketing-site.com/summer-sale&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// No expiration&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;promoLink&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Example Output: "4TddlZPBI5OvE27LDkbwL"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketing Campaigns&lt;/strong&gt;:
Manage marketing campaign URLs with ease. Tiny-Link allows you to generate and track short URLs for promotional campaigns, ensuring efficient analytics and engagement monitoring.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;campaignLink&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tinyLink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shortenUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://your-campaign-landing-page.com/new-product&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;604800&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Expires in 7 days&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;campaignLink&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Example Output: "6TmD1p-N7fz9kROQyYNeW"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic QR Codes&lt;/strong&gt;:
Integrate Tiny-Link with QR code generators to create dynamic QR codes for printed materials or digital platforms. Provide users with quick access to content without the need for lengthy URLs.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;qrCodeLink&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tinyLink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shortenUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://your-qr-code-content.com/special-offer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2592000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Expires in 30 days&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;qrCodeLink&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Example Output: "x7l8UcP-2XJpWvR_q0HkD"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How to Get Started&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;tiny-link
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;TinyLink&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tiny-link&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Redis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ioredis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Create an ioredis instance&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;yourRedisClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Redis&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Create an instance with your Redis client&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tinyLink&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;TinyLink&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;yourRedisClient&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Shorten a URL&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;shortKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tinyLink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shortenUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://example.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Get the original URL&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;originalUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tinyLink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getOriginalUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;shortKey&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check out the &lt;a href="https://github.com/sr-26/tiny-link"&gt;TinyLink GitHub repository&lt;/a&gt; for detailed documentation and customization options.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get Involved&lt;/strong&gt;&lt;br&gt;
Tiny-Link is open source, and we invite you to contribute, report issues, or suggest enhancements. Join us on our GitHub repository and be part of the Tiny-Link community.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
    <item>
      <title>📧 Introducing Email Inspector 📧</title>
      <dc:creator>Weasely</dc:creator>
      <pubDate>Sun, 08 Oct 2023 16:35:39 +0000</pubDate>
      <link>https://forem.com/sr-26/introducing-email-inspector-2fh6</link>
      <guid>https://forem.com/sr-26/introducing-email-inspector-2fh6</guid>
      <description>&lt;p&gt;Are you tired of dealing with invalid or improperly formatted email addresses in your applications? Say goodbye to email hassles with Email Inspector – a powerful Node.js package for email address validation and inspection! 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate email addresses with precision, using a comprehensive list of registered Top-Level Domains (TLDs).&lt;/li&gt;
&lt;li&gt;Ensure that email addresses adhere to the correct format and structure.&lt;/li&gt;
&lt;li&gt;Effortlessly identify whether an email is associated with a business or a free provider.&lt;/li&gt;
&lt;li&gt;Customize validation rules with ease, including options for custom free providers and provider exclusions.&lt;/li&gt;
&lt;li&gt;Seamlessly integrate Email Inspector into your Node.js applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Getting Started Is a Breeze:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install email-inspector
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const emailInspector = require('email-inspector');

const email = 'user@example.com';

if (emailInspector.validate(email)) {
  console.log('Email is valid');
} else {
  console.log('Email is invalid');
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whether you're building registration forms, contact systems, or any application that handles emails, Email Inspector has got your back. Ensure the integrity of your email communication effortlessly!&lt;/p&gt;

&lt;p&gt;📦 NPM Package: &lt;a href="https://www.npmjs.com/package/email-inspector"&gt;https://www.npmjs.com/package/email-inspector&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>opensource</category>
      <category>npm</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Introducing Athena-Express-Plus: Elevating Your Amazon Athena Experience</title>
      <dc:creator>Weasely</dc:creator>
      <pubDate>Sat, 23 Sep 2023 07:23:07 +0000</pubDate>
      <link>https://forem.com/sr-26/introducing-athena-express-plus-elevating-your-amazon-athena-experience-44n2</link>
      <guid>https://forem.com/sr-26/introducing-athena-express-plus-elevating-your-amazon-athena-experience-44n2</guid>
      <description>&lt;p&gt;Are you ready to supercharge your Amazon Athena experience? Meet &lt;a href="https://www.npmjs.com/package/athena-express-plus"&gt;Athena-Express-Plus&lt;/a&gt;, the enhanced version of Athena-Express that takes your AWS V3 architecture support to the next level. In this blog post, we'll explore how Athena-Express-Plus seamlessly integrates with the latest AWS services and features, making SQL queries on Amazon Athena a breeze.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Taking Athena-Express to the Next Level&lt;/strong&gt;&lt;br&gt;
Athena-Express-Plus is a fork of the original &lt;a href="https://www.npmjs.com/package/athena-express"&gt;Athena-Express&lt;/a&gt; project. While it retains the core capabilities of Athena-Express, it goes the extra mile by introducing support for parameterized queries. This feature allows you to inject parameters into your SQL queries, enabling dynamic execution—a game-changer for your Athena workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Glimpse of Simplicity&lt;/strong&gt;&lt;br&gt;
One of Athena-Express-Plus's standout features is its ability to simplify SQL query execution in Amazon Athena. Whether you're building a web application or working on other projects, this tool can streamline your workflow. It not only executes SQL queries but also fetches clean JSON results in the same request, making it a versatile choice for developers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aBQHd_vn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://image.ibb.co/cWNvFV/carbon-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aBQHd_vn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://image.ibb.co/cWNvFV/carbon-1.png" alt="Athena-Express-Plus Example" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unveiling Amazon Athena&lt;/strong&gt;&lt;br&gt;
Before diving deeper into Athena-Express-Plus, let's take a moment to understand Amazon Athena. Launched at AWS re:Invent 2016, Athena revolutionizes data analysis in Amazon S3 using standard SQL. Powered by Presto, an open-source SQL engine developed by Facebook, Athena is a potent tool for querying massive datasets.&lt;/p&gt;

&lt;p&gt;Athena combines Presto's power with AWS's serverless and self-managed capabilities, eliminating the need for complex ETL jobs. This means you can quickly analyze large-scale datasets with the SQL skills you already possess.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Athena-Express-Plus Advantage&lt;/strong&gt;&lt;br&gt;
So, how does Athena-Express-Plus simplify your Amazon Athena integration? It bundles several essential steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Initiating Query Execution&lt;/strong&gt;: Athena-Express-Plus kicks off your query execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring Progress&lt;/strong&gt;: It keeps an eye on your query until it's done.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fetching Results&lt;/strong&gt;: Once the query finishes, it retrieves the results from Amazon S3.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But Athena-Express-Plus doesn't stop there. It offers additional benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clean JSON Formatting&lt;/strong&gt;: Results are neatly formatted into user-friendly JSON arrays.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Handling&lt;/strong&gt;: It handles specific Athena errors like ThrottlingException and NetworkingError gracefully.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost Tracking&lt;/strong&gt;: Get optional statistics, including the cost per query in USD.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible Result Retrieval&lt;/strong&gt;: Fetch results via Pagination or as a continuous stream.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synchronous and Asynchronous Modes&lt;/strong&gt;: Choose the fetching mode that suits your needs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without Athena-Express-Plus, you'd have to painstakingly identify the right API methods, piece them together, and manage error handling for each step. Athena-Express-Plus streamlines this integration, freeing you to focus on your core development tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-World Application&lt;/strong&gt;&lt;br&gt;
Athena-Express-Plus finds its most common use case in web applications, acting as a backend for integrating Amazon Athena. It's versatile enough to work in various scenarios, from local applications to AWS Lambda functions.&lt;/p&gt;

&lt;p&gt;Here's an example using AWS Lambda:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TJ3Pe1ik--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://image.ibb.co/k3RpNA/Screen-Shot-2018-11-22-at-11-17-58-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TJ3Pe1ik--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://image.ibb.co/k3RpNA/Screen-Shot-2018-11-22-at-11-17-58-AM.png" alt="Athena-Express-Plus Architecture" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this setup, a web frontend triggers an API endpoint hosted on Amazon API Gateway, passing a query request. The API Gateway then invokes a Lambda function equipped with Athena-Express-Plus. It's a streamlined, efficient way to harness the power of Amazon Athena in your applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting Started with Athena-Express-Plus&lt;/strong&gt;&lt;br&gt;
Setting up Athena-Express-Plus is straightforward. First, you'll need to configure it, either with simple or advanced settings. Let's look at a basic configuration example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const athena = new Athena({ region: "REGION" });
const s3 = new S3({ region: "REGION" });
const athenaExpressConfig = { athena, s3, s3Bucket: "s3://my-bucket" };
const athenaExpress = new AthenaExpress(athenaExpressConfig);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you require more advanced configurations, such as changing the database, workgroup, or encryption settings, Athena-Express-Plus can accommodate those too. It's all about flexibility and making sure it fits your specific needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Querying with Athena-Express-Plus&lt;/strong&gt;&lt;br&gt;
With Athena-Express-Plus configured, you can start querying Amazon Athena effortlessly. Here's a quick example using both object and string notations:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Using Promises&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myQuery = {
    sql: "SELECT elb_name, request_port, request_ip FROM elb_logs LIMIT 3",
    db: "sampledb"
};

athenaExpress
    .query(myQuery)
    .then(results =&amp;gt; {
        console.log(results);
    })
    .catch(error =&amp;gt; {
        console.log(error);
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Using Async/Await&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(async () =&amp;gt; {
    let myQuery = "SELECT elb_name, request_port, request_ip FROM elb_logs LIMIT 3";

    try {
        let results = await athenaExpress.query(myQuery);
        console.log(results);
    } catch (error) {
        console.log(error);
    }
})();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also leverage the QueryExecutionId if you have it from a previous execution, which is handy for scenarios like skipping result retrieval or waiting for results asynchronously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Support for Parameterized Queries&lt;/strong&gt;&lt;br&gt;
Athena-Express-Plus brings another powerful feature to the table—support for parameterized queries. With parameterized queries, you can inject dynamic values into your SQL queries, making it easy to execute similar queries with different parameters.&lt;/p&gt;

&lt;p&gt;Here's a glimpse of how to use parameterized queries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myQuery = {
    sql: "SELECT * FROM cloudfront_logs LIMIT ?",
    db: "mydatabase",
    values: ['2']
};

athenaExpress
    .query(myQuery)
    .then(results =&amp;gt; {
        console.log(results);
    })
    .catch(error =&amp;gt; {
        console.log(error);
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we use placeholders (?) in the SQL query and provide the actual parameter values in the values array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get Started with Athena-Express-Plus&lt;/strong&gt;&lt;br&gt;
Athena-Express-Plus opens up new possibilities for simplifying your Amazon Athena interactions. Whether you're a web developer, data analyst, or cloud enthusiast, this enhanced tool can make your life easier when dealing with Amazon Athena. To get started, check out the &lt;a href="https://www.npmjs.com/package/athena-express-plus"&gt;Athena-Express-Plus&lt;/a&gt; package and dive into the documentation.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>node</category>
      <category>opensource</category>
      <category>athena</category>
    </item>
  </channel>
</rss>
