import tkinter as tk
from threading import Thread
from http.server import HTTPServer, CGIHTTPRequestHandler
httpserver_address = ("", 80)
httpserver = HTTPServer(httpserver_address, CGIHTTPRequestHandler)
srv_thread = Thread(target=httpserver.serve_forever)
root = tk.Tk()
root.title('Server')
root.minsize(width = 20, height = 50)
root.maxsize(width = 20, height = 50)
buttonStart = tk.Button(root, text = "Start", width = 5, height = 1, bg = "#099a0f")
buttonStart.bind("<Button-1>", lambda event: srv_thread.start())
buttonStart.grid(row = 2, column = 0, columnspan = 1)
root.mainloop()