8000 GitHub - khoahuynhdev/hboa · GitHub
[go: up one dir, main page]

Skip to content
Dismiss alert
khoahuynhdevPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Overview

Project X aka take home assignment

Requisite

  • node (>=16)
  • make
  • python 3.11

initial setup

  • Run make to create virtual environment
make
  • Activate the venv
source .venv/bin/activate
  • Install python dependencies
pip install -r requirements.txt
  • Install nodejs dependencies
cd user-service
npm install

1. User Service

Endpoints

  • GET /users: List all users
  • GET /users/:id: Get users by ID
  • POST /users: Create a new user
  • PUT /users/:id: Edit a user
  • DELETE /users/:id: Delete a user

How to start

  • Start user service
cd user-service
npm start

2. Backend web server

CRUD Operations via Django Admin

  • GET /products: Retrieve all products
  • POST /products: Create a new product
  • GET /products/:id: Get product by ID
  • PUT /products/:id: Update product by ID
  • DELETE /products/:id: Delete product by ID

How to start

  • Run backend
  • Run migrations to create database tables:
  • Create an admin(username:admin/pass:homebase2023)
  • Start backend
cd backend
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

3. Proxy Service

Usage

Make requests to the hardcode proxy user-service

How to start

  • Start the proxy service
  • Run the Python Proxy Script (localhost:5000/proxy)
cd proxy-service
python api_proxy.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0