Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BiteSpeed Web Service

Installation

To install the dependencies, run:

yarn install

Build

To build the project, run:

yarn build

Start

To start the server, run:

yarn start

Environment Variables

Create a .env file in the root directory with the following variables:

EXPRESS_PORT=3009

NODE_ENV=prod
DB_SYNC_FLAG=true

# Database dev
DB_CONNECTION=postgres
DB_HOST=
DB_PORT=5432
DB_DATABASE=postgres
DB_USERNAME=
DB_PASSWORD=

Endpoints

/api/new

Method: POST

Description: Creates or updates contacts.

Request Body:

{
  "email": "example@example.com",
  "phoneNumber": "1234567890"
}

Response:

{
  "statusCode": 200,
  "message": "successfully created/updated contacts"
}

/api/identify

Method: POST

Description: Identifies a contact based on email or phone number.

Request Body:

{
  "email": "example@example.com",
  "phoneNumber": "1234567890"
}

Response:

{
  "primaryContactId": "383a66df-3795-4533-b4ac-5aca6d8446b3",
  "emails": ["ravi@example.com", "charu@example.com", "haha@example.com"],
  "phoneNumbers": ["9636565686"],
  "secondaryContactIds": [
    "bc74b571-6086-495c-92ef-5cecc1032d98",
    "b3db3751-8b6b-4fee-9f1e-6e14768fe456",
    "b6997684-0f1d-4665-8ae5-998a67785ac7"
  ]
}

Hosted Endpoints

http://13.233.165.252:5656/ (hit check!)
http://13.233.165.252:5656/api/identify
http://13.233.165.252:5656/api/new

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages