This project is an Express.js application deployed on Google Cloud Run, which interacts with a PostgreSQL database hosted on Neon. The application provides an endpoint to identify users based on their email and phone number.
The application is deployed on Google Cloud Run and can be accessed at:
https://bitespeed-zkp4nbmxea-uc.a.run.app
POST https://bitespeed-zkp4nbmxea-uc.a.run.app/order/identify
This endpoint requires an email and phone number in the request body. You can test this endpoint using Postman or any other API testing tool.
Example Request Body:
{
"email": "example@example.com",
"phonenumber": "1234567890"
}
Setting Up the Project Locally
Follow the steps below to set up and run the project locally:
Prerequisites Node.js installed on your machine PostgreSQL database setup on Neon
Clone the repository to your local machine using the following command:
git clone https://github.com/ashish07-07/Bitespeed.git
Navigate to the project directory and install the required dependencies:
cd Bitespeed
npm install
Create a .env file in the root directory and add the following environment variables. Replace the placeholders with your actual PostgreSQL URL and any other required configuration.
DATABASE_URL=your_neon_postgresql_url
PORT=3000
{
"email": "example@example.com",
"phoneNumber": "1234567890"
}
When existing user with with same primary email but different phonenumber Requests makes them a secondary users :
when 2 existing primary user requests with one priamry email and priamry phonenumber then one with the phonenumber is linked to priamry email and its linked