Skip to content

megomes/google_clone_backend_node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Clone

TypeScript NodeJS ElasticSearch Vercel

Google Clone is a VueJS application that clones Google for testing/studying purposes

Link to Frontend repository: Google Clone Frontend

Backend

Surprise: This is not a Backend!

This project uses Serverless Functions on Vercel using NodeJS

These Serverless functions access an ElasticSearch hosted on Bonsai.io to serve data to a Frontend App.

0. Secrets

Create a file .env in the main folder

KIBANA_URL=https://USER:PASSWORDc@URL:PORT

A. Jupyter Notebook

On ./jupyter_tests/* you will find Notebooks used for testing

B. Vercel Serverless Functions

Install Vercel CLI

$ npm i -g vercel

Install Packages and Execute:

$ npm install
$ npx vercel dev

Endpoints

/api/wiki/search/match

POST body:

{
  "text": "TEXT TO SEARCH"
}

Returns:

{
    "_index": ELASTIC_INDEX,
    "_type": "_doc",
    "_id": ELASTIC_ID,
    "_score": SEARCH_SCORE,
    "_source": {
        "title": DOC_TITLE,
        "href": DOC_LINK
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published