https://github.com/joeywhelan/serverless-js
Demo of Elastic Cloud Serverless REST API and Elastic JavaScript client usage.
https://github.com/joeywhelan/serverless-js
axios elasticsearch javascript nodejs rest-api serverless
Last synced: 9 months ago
JSON representation
Demo of Elastic Cloud Serverless REST API and Elastic JavaScript client usage.
- Host: GitHub
- URL: https://github.com/joeywhelan/serverless-js
- Owner: joeywhelan
- License: mit
- Created: 2025-06-08T17:51:33.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-08T18:22:37.000Z (10 months ago)
- Last Synced: 2025-06-08T18:37:03.690Z (10 months ago)
- Topics: axios, elasticsearch, javascript, nodejs, rest-api, serverless
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Elastic Serverless Demo
## Contents
1. [Summary](#summary)
2. [Architecture](#architecture)
3. [Features](#features)
4. [Prerequisites](#prerequisites)
5. [Installation](#installation)
6. [Usage](#usage)
## Summary
This creates a deployment of Elasticsearch Serverless via API with use of the Elastic Javascript client library for a semantic search scenario.
## Architecture

## Features
- Builds an Elastic Serverless project via REST API
- Creates a client via the Javascript library
- Performs the following steps with the Javascript client:
- Creates an Inference Endpoint to an Azure Openai embedding model
- Creates an index mapping corresponding to a dataset in this repo
- Bulk loads the included JSON lines dataset (1000 documents). This Kaggle [dataset](https://www.kaggle.com/datasets/rmisra/news-category-dataset) was used.
- Performs a sample semantic search against this dataset
- Deletes the Elastic Serverless project
## Prerequisites
- Elastic Cloud account and API key
- Azure Openai resource and API key
- node
- npm
## Installation
- Execute the command below
```bash
git clone git@github.com:joeywhelan/serverless-js.git && cd serverless-js && npm install
```
- Rename the .env-template file to .env.
- Edit that .env file with your Elastic and Azure credentials.