Setting un invoice pdf microservice
This commit is contained in:
		
							
								
								
									
										24
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								Makefile
									
									
									
									
									
								
							@ -5,7 +5,7 @@ API_PORT=4001
 | 
			
		||||
DSN=vinchent:secret@tcp(localhost:3306)/widgets?parseTime=true&tls=false
 | 
			
		||||
 | 
			
		||||
## build: builds all binaries
 | 
			
		||||
build: clean build_front build_back
 | 
			
		||||
build: clean build_front build_back build_invoice
 | 
			
		||||
	@printf "All binaries built!\n"
 | 
			
		||||
 | 
			
		||||
## clean: cleans all binaries and runs go clean
 | 
			
		||||
@ -15,6 +15,12 @@ clean:
 | 
			
		||||
	@go clean
 | 
			
		||||
	@echo "Cleaned!"
 | 
			
		||||
 | 
			
		||||
## build_invoice: builds the invoice microservice
 | 
			
		||||
build_invoice:
 | 
			
		||||
	@echo "Building invoice microservice..."
 | 
			
		||||
	@go build -o dist/invoice ./cmd/micro/invoice
 | 
			
		||||
	@echo "Invoice microservice built!"
 | 
			
		||||
 | 
			
		||||
## build_front: builds the front end
 | 
			
		||||
build_front:
 | 
			
		||||
	@echo "Building front end..."
 | 
			
		||||
@ -28,8 +34,14 @@ build_back:
 | 
			
		||||
	@echo "Back end built!"
 | 
			
		||||
 | 
			
		||||
## start: starts front and back end
 | 
			
		||||
start: start_front start_back
 | 
			
		||||
start: start_front start_back start_invoice
 | 
			
		||||
	
 | 
			
		||||
## start_invoice: starts the invoice microservice
 | 
			
		||||
start_invoice: build_invoice
 | 
			
		||||
	@echo "Starting the invoice microservice..."
 | 
			
		||||
	@./dist/invoice &
 | 
			
		||||
	@echo "invoice microservice running!"
 | 
			
		||||
 | 
			
		||||
## start_front: starts the front end
 | 
			
		||||
start_front: build_front
 | 
			
		||||
	@echo "Starting the front end..."
 | 
			
		||||
@ -43,9 +55,15 @@ start_back: build_back
 | 
			
		||||
	@echo "Back end running!"
 | 
			
		||||
 | 
			
		||||
## stop: stops the front and back end
 | 
			
		||||
stop: stop_front stop_back
 | 
			
		||||
stop: stop_front stop_back stop_invoice
 | 
			
		||||
	@echo "All applications stopped"
 | 
			
		||||
 | 
			
		||||
## stop_invoice: stops the invoice microservice
 | 
			
		||||
stop_invoice:
 | 
			
		||||
	@echo "Stopping the invoice microservice..."
 | 
			
		||||
	@-pkill -SIGTERM -f "invoice"
 | 
			
		||||
	@echo "Stopped invoice microservice"
 | 
			
		||||
 | 
			
		||||
## stop_front: stops the front end
 | 
			
		||||
stop_front:
 | 
			
		||||
	@echo "Stopping the front end..."
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user