Skip to content

Latest commit

 

History

History
57 lines (53 loc) · 4.43 KB

README.md

File metadata and controls

57 lines (53 loc) · 4.43 KB

API Endpoints

Endpoint Method Body Description JWT Token
/ GET - Accessing our root endpoints
/auth/register POST email, password, name Register account for new user
/auth/login POST email, password Login to access the feature in application
/auth/google GET - Login with Google Account
/auth/forgot-password POST email Send Forgot Password email for user
/auth/logout GET - Logout for user
/auth/token-validation GET - JWT Token Validation
/users GET - Show all users
/users/profile GET - Show the detail data from user
/users/update PUT Anything you want to edit from: name, gender, phone Edit profile from user
/users/delete DELETE - Delete profile from user
/users/upload-image POST image Upload profile image from user
/destinations GET - Show all destinations
/destinations/detail/{dataId} GET - Show the detail destinations
/destinations/saved GET - Show all saved destinations
/destinations/add POST id Add destination to saved
/destinations/delete DELETE id Delete saved destination
/chatbot POST prompt Ask travel tips/question for chatbot

Firebase | Cloud Firestore

Melancong_DB

Running Locally

npm install
npm run dev

Note

Open http://localhost:7777 with Postman or your API testing tool.

Deploy to Firebase Functions

npm install -g firebase-tools
firebase init
npm run deploy

Deploy API to Google Cloud Run

docker build -t gcr.io/melanc0ng/backend:tag .
docker push gcr.io/melanc0ng/backend:tag
gcloud run deploy melancong-api --image gcr.io/melanc0ng/backend:tag --platform managed