This repository contains the backend API for the Tanamify project. The backend is built using Express.js and provides several endpoints for user authentication and prediction data management. Additionally, the backend is deployed on Google Cloud Compute Engine, with MySQL as the database.
- Develop Backend API for Register, Login, Logout, and Get Login User using Express.js
- Create Backend API to Store Prediction Data and Get Prediction Data by User using Express.js
- Perform API Testing with Postman
- Deploy Backend on Google Cloud Compute Engine
- Deploy MySQL on Google Cloud Compute Engine
- Create firewall rules
- Node.js
- Express.js
- MySQL
- Postman
- Google Cloud Account
- Clone the repository:
git clone https://github.com/Tanamify/CC-Tanamify.git
- Install dependencies:
cd CC-Tanamify npm install
- Set up MySQL database on Google Cloud Compute Engine.
Start the server:
npm start
The backend API will be available at 34.101.178.174:3000
.
- Register:
POST /api/auth/register
- Login:
POST /api/auth/login
- Logout:
POST /api/auth/logout
- Get Login User:
GET /api/auth/profile
- Store Prediction Data:
POST /api/predict/add
- Get Prediction Data by User:
GET /api/predict/user-predictions
Perform API testing using Postman:
- Import the Postman collection provided in the repository.
- Run the tests to ensure all endpoints are working correctly.
- Set up a VM instance on Google Cloud Compute Engine.
- SSH into the VM and clone the repository.
- Install Node.js and other dependencies on the VM.
- Configure and start the backend server on the VM.
- Set up a MySQL instance on Google Cloud Compute Engine.
- Configure the database and update the backend API to connect to this instance.
- Create firewall rules to allow traffic on the required ports for your backend API and MySQL instance.
Name | ID |
---|---|
Erlan Irhab Ghalib | C200D4KY0885 |
Derva Anargya Ghaliy | C200D4KY0347 |
Feel free to reach out if you have any questions or need further assistance!
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to reach out if you have any questions or need further assistance!