-
Clone the repository:
git clone https://github.com/yourusername/backend-repo.git cd backend-repo
-
Install dependencies:
npm install
-
Set up Firebase:
- Place your Firebase service account key in the
config
folder asserviceAccountKey.json
.
- Place your Firebase service account key in the
-
Start the server:
npm start
- URL:
/api/users/update
- Method:
POST
- Body:
{ "userId": "string", "data": { // user data } }
- Response:
{ "message": "User data updated successfully" }
- URL:
/api/users/fetch/:userId
- Method:
GET
- Response:
{ // user data }
authMiddleware
: Validates the request token. Ensure to include anAuthorization
header with each request.