FastLED 3.9.15
Loading...
Searching...
No Matches

◆ main()

int test_server.main ( )
Main entry point.

Definition at line 168 of file test_server.py.

168def main() -> int:
169 """Main entry point."""
170 parser = argparse.ArgumentParser(description="HTTP test server for Client.ino")
171 parser.add_argument("--host", default="localhost", help="Server host")
172 parser.add_argument("--port", type=int, default=8081, help="Server port")
173 args = parser.parse_args()
174
175 server_address = (args.host, args.port)
176 httpd = HTTPServer(server_address, HTTPBinHandler)
177
178 console.print("\n[bold green]FastLED HTTP Test Server[/bold green]")
179 console.print(f"Listening on [cyan]http://{args.host}:{args.port}/[/cyan]\n")
180 console.print("[dim]Available endpoints:[/dim]")
181 console.print(" [cyan]GET /[/cyan] - Welcome page")
182 console.print(" [cyan]GET /json[/cyan] - Sample JSON slideshow data")
183 console.print(" [cyan]GET /get[/cyan] - Echo request information")
184 console.print(" [cyan]GET /ping[/cyan] - Health check")
185 console.print(" [cyan]POST /post[/cyan] - Echo POST data")
186 console.print("\n[yellow]Press Ctrl+C to stop[/yellow]\n")
187
188 httpd.serve_forever()
189 return 0
190
191

References main().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: