Skip to content

maloong-zhang/mp423

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mp423

Architecture

Architecture

NOTE

This project need to create two queue first, one name is "video" and the other is "mp3", you can use the ingress service: "Rabbit Management"

Create a Environment

python3 -m venv .venv
source ./venv/bin/activate.fish

Generate Requirements

pip3 freeze > requirements.txt

Delete K8S Server

kubectl delete -f auth/manifests
kubectl delete -f converter/manifests
kubectl delete -f notification/manifests
kubectl delete -f gateway/manifests
kubectl delete -f mongo/manifests
kubectl delete -f rabbit/manifests

Start K8S Server

kubectl apply -f mongo/manifests
kubectl apply -f auth/manifests
kubectl apply -f converter/manifests
kubectl apply -f notification/manifests
kubectl apply -f gateway/manifests
kubectl apply -f rabbit/manifests

Management Address

RabbitMQ MongoDB

Change Host File

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1             localhost
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
192.168.49.2 mongo.express.com
# End of section
127.0.0.1 mp3converter.com
127.0.0.1 rabbitmq-manager.com
127.0.0.1 host.minikube.internal
127.0.0.1 mongo-express.com

Login In

 curl -X POST -u [email protected]:Admin123 http://mp3converter.com/login

get the jwt token

 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Im1hbG9vbmcyMDIyQGdtYWlsLmNvbSIsImV4cCI6MTcxOTY0NjcxNCwiaWF0IjoxNzE5NTYwMzE0LCJhZG1pbiI6dHJ1ZX0.epdabvk0kqv1ys6n4sTvRHucjtPbcSz6mFPrs2noJDE

Put the MP4 file

 curl -X POST -F 'file=@./1.mp4' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Im1hbG9vbmcyMDIyQGdtYWlsLmNvbSIsImV4cCI6MTcxOTY0NjcxNCwiaWF0IjoxNzE5NTYwMzE0LCJhZG1pbiI6dHJ1ZX0.epdabvk0kqv1ys6n4sTvRHucjtPbcSz6mFPrs2noJDE' http://mp3converter.com/upload

Get file ID from the email

667e8c7e9e07558d49740a8d

Get the MP3 file

 curl --output some.mp3 -X GET -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Im1hbG9vbmcyMDIyQGdtYWlsLmNvbSIsImV4cCI6MTcxOTY0NjcxNCwiaWF0IjoxNzE5NTYwMzE0LCJhZG1pbiI6dHJ1ZX0.epdabvk0kqv1ys6n4sTvRHucjtPbcSz6mFPrs2noJDE' "http://mp3converter.com/download?fid=667e8c7e9e07558d49740a8d"

About

mp4 convert to mp3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published