API URL : https://melancong-be.vercel.app
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 | 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 | ☑ |
npm install
npm run dev
Note
Open http://localhost:7777 with Postman
or your API testing tool.
npm install -g firebase-tools
firebase init
npm run deploy
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